Conversation
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
Hello delthas,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
❌ 1 Tests Failed:
View the full list of 1 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
|
/approve |
|
!done 2h |
|
!release |
Build failedThe build for commit did not succeed in branch improvement/CLDSRV-1006/mongodb-shard-collections-env The following options are set: approve |
|
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
This pull request did not target the following hotfix branch(es) so they
Please check the status of the associated issue CLDSRV-1006. Goodbye delthas. The following options are set: approve |
|
Release summary:
|
|
|
docker-entrypoint.shmaps the other mongo settings (MONGODB_HOSTS,MONGODB_RS,MONGODB_DATABASE) from env vars, but notmongodb.shardCollections. That setting is required to run againstmongos: besides sharding collections, it keeps Arsenal from appending&replicaSet=<rs>(defaultrs0) 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.jsonwithjq, and start the server themselves. Sorbet's functional-testdocker-compose.ymldoes this, which bypassestiniand the entrypoint and ties it to the image's package manager (itsyarn startbreaks with #6306).Setting
MONGODB_SHARD_COLLECTIONSto 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.1so sorbet can pin a released tag instead of a commit image.Issue: CLDSRV-1006