There are two ways shardVersion information is sent to a mongod:
1) as part of the command, which the mongod uses to set the shardVersion on the OperationShardingState
2) by using a versioned connection, by sending setShardVersion to the mongod before sending the command
SERVER-22663 added checks to prevent a mongod that is not running with --shardsvr from accepting commands with shardVersion information sent the first way.
In order to also prevent it from accepting commands with shardVersion information sent the second way, mongods not running with --shardsvr should fail the setShardVersion command with the same error.
This is currently manifesting in the read_only_sharded suite, where shard mongods are not yet being started with --shardsvr (see SERVER-25549), but commands that send shardVersion information through setShardVersion are passing.
- is related to
-
SERVER-25549 re-enable read_only_sharded suite
- Closed
- related to
-
SERVER-22663 Make --shardsvr required for a mongod to be used as a shard
- Closed