Sharding is broken. Here are some fixes.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MongoDB Charm |
Won't Fix
|
Medium
|
Edin S |
Bug Description
Hi everyone,
There are a couple problems deploying a Sharded config for certain versions of Mongo 3.
The problems I’ve found so far are in hooks.py:
• (Mongo V3.2) The enable_mongos function --configdb option is writing the config servers string syntax in SCCC format and not CSRS.
To solve this, simple change the config server string like this (config server replica set name followed by forward slash):
mongos --configdb ${replSet}
Reference: https:/
• (Mongo V3.6) Shard Servers now require a --shardsvr option when the mongod process is spawned. I haven’t traced the code in the charm yet but “shardsvr” is not located anywhere. Maybe reloading each Replicaset mongod when the shard relationship to mongos is enabled? Or maybe just reading the config file and setting the --shardsvr option during the initial spawn?
Reference - https:/
Also, there are a couple other simple fixes I outlined a while ago that are necessary to do before tackling the list above that affected Mongo V2.4. Here are those changes:
In config_changed function:
enable_
enable_
In configsvr_
juju_
config_data = config()
my_port = config_
disable_
+ enable_
Is anybody else using this charm for sharded cluster deployment?
Charles
Changed in charm-mongodb: | |
assignee: | nobody → Xav Paice (xavpaice) |
status: | New → In Progress |
Changed in charm-mongodb: | |
assignee: | nobody → Edin S (exsdev) |
Changed in charm-mongodb: | |
importance: | High → Medium |
Tested this out, at least using the documentation and Mongo 3.6 I can confirm that sharding doesn't work.