Skip to content

Set mongodb.shardCollections from MONGODB_SHARD_COLLECTIONS - #6312

Merged
bert-e merged 2 commits into
development/9.5from
improvement/CLDSRV-1006/mongodb-shard-collections-env
Sep 27, 2026
Merged

bert-e merged 2 commits into
development/9.5from
improvement/CLDSRV-1006/mongodb-shard-collections-env

Conversation

@delthas

@delthas delthas commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

docker-entrypoint.sh maps the other mongo settings (MONGODB_HOSTS, MONGODB_RS, MONGODB_DATABASE) from env vars, but not mongodb.shardCollections. That setting is required to run against mongos: besides sharding collections, it keeps Arsenal from appending &replicaSet=<rs> (default rs0) to the connection URL, which a mongos router rejects.

Without it, consumers running the image against a sharded cluster have to override the entrypoint and command, patch config.json with jq, and start the server themselves. Sorbet's functional-test docker-compose.yml does this, which bypasses tini and the entrypoint and ties it to the image's package manager (its yarn start breaks with #6306).

Setting MONGODB_SHARD_COLLECTIONS to any non-empty value now sets .mongodb.shardCollections=true, following the existing boolean flags (RECORDLOG_ENABLED, TESTING_MODE). This lets such consumers run the image with the default entrypoint and CMD, configured through env vars only (scality/sorbet#238, SOR-295).

Also bumps the version to 9.5.0-preview.1 so sorbet can pin a released tag instead of a commit image.

Issue: CLDSRV-1006

The entrypoint maps the other mongo settings (MONGODB_HOSTS,
MONGODB_RS, MONGODB_DATABASE) from env vars but not shardCollections,
which is required to run against mongos: it also keeps Arsenal from
adding replicaSet=rs0 to the connection URL. Consumers running the
image against a sharded cluster, like sorbet's functional tests,
override the entrypoint and command to patch config.json themselves.

Setting MONGODB_SHARD_COLLECTIONS to any non-empty value now sets
.mongodb.shardCollections=true, like the other boolean flags.

Issue: CLDSRV-1006
@bert-e

bert-e commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Hello delthas,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval ⭐
/bypass_build_status Bypass the build and test status ⭐
/bypass_commit_size Bypass the check on the size of the changeset TBA ⭐
/bypass_incompatible_branch Bypass the check on the source branch prefix ⭐
/bypass_jira_check Bypass the Jira issue check ⭐
/bypass_peer_approval Bypass the pull request peers' approval ⭐
/bypass_leader_approval Bypass the pull request leaders' approval ⭐
/bypass_source_branch_lineage Bypass the cross-branch contamination check ⭐
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request.
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@scality scality deleted a comment from bert-e Sep 25, 2026
@bert-e

bert-e commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

@codecov

codecov Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
9951 1 9950 0
View the full list of 1 ❄️ flaky test(s)
"before each" hook for "should retrieve a part that overwrote another part originally copied from an MPU"::GET object With default signature With PartNumber field uploadPartCopy overwrite "before each" hook for "should retrieve a part that overwrote another part originally copied from an MPU"

Flake rate in main: 100.00% (Passed 0 times, Failed 21 times)

Stack Traces | 40s run time
Timeout of 40000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (.../test/object/get.js)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@delthas
delthas marked this pull request as ready for review September 25, 2026 09:49
@delthas

delthas commented Sep 25, 2026

Copy link
Copy Markdown
Contributor Author

/approve

@delthas

delthas commented Sep 25, 2026

Copy link
Copy Markdown
Contributor Author

!done 2h

@delthas

delthas commented Sep 25, 2026

Copy link
Copy Markdown
Contributor Author

!release

@bert-e

bert-e commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Build failed

The build for commit did not succeed in branch improvement/CLDSRV-1006/mongodb-shard-collections-env

The following options are set: approve

@bert-e

bert-e commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/9.5

The following branches have NOT changed:

  • development/7.10
  • development/7.4
  • development/7.70
  • development/8.8
  • development/9.0
  • development/9.1
  • development/9.2
  • development/9.3
  • development/9.4

This pull request did not target the following hotfix branch(es) so they
were left untouched:

  • hotfix/9.2.36
  • hotfix/6.4.7
  • hotfix/7.4.6
  • hotfix/7.4.9
  • hotfix/7.10.3
  • hotfix/7.10.30
  • hotfix/7.70.45
  • hotfix/7.4.8
  • hotfix/9.3.13
  • hotfix/7.9.0
  • hotfix/7.4.2
  • hotfix/7.10.15
  • hotfix/7.4.7
  • hotfix/7.4.3
  • hotfix/7.10.2
  • hotfix/7.70.51
  • hotfix/7.10.4
  • hotfix/7.8.0
  • hotfix/7.4.10
  • hotfix/7.10.49
  • hotfix/9.0.32
  • hotfix/7.10.8
  • hotfix/7.4.1
  • hotfix/7.10.0
  • hotfix/7.10.27
  • hotfix/7.4.5
  • hotfix/7.2.0
  • hotfix/7.6.0
  • hotfix/7.4.4
  • hotfix/7.10.28
  • hotfix/7.10.1
  • hotfix/7.4.0
  • hotfix/7.70.11
  • hotfix/9.2.24
  • hotfix/7.7.0
  • hotfix/8.8.45
  • hotfix/7.70.21
  • hotfix/9.0.7
  • hotfix/7.70.73

Please check the status of the associated issue CLDSRV-1006.

Goodbye delthas.

The following options are set: approve

@bert-e
bert-e merged commit 6e425cb into development/9.5 Sep 27, 2026
60 of 63 checks passed
@bert-e
bert-e deleted the improvement/CLDSRV-1006/mongodb-shard-collections-env branch September 27, 2026 18:54
@delthas

delthas commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

Release summary:

@delthas

delthas commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

CLDSRV-1006: logged 2h; transitioned to Done (Fixed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants