Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-25910

fail setShardVersion on mongod if not running with --shardsvr

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.14
    • Affects Version/s: 3.3.12
    • Component/s: Sharding
    • Labels:
    • Fully Compatible
    • ALL
    • Sharding 2016-09-19

      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.

            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            0 Vote for this issue
            3 Start watching this issue