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

updated replset config successfully, but isMaster still reports all config until server restart

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.9.0
    • Affects Version/s: None
    • Component/s: Replication
    • Labels:
      None
    • ALL

      old config is:
      {
      "setName" : "foo",
      "ismaster" : false,
      "secondary" : true,
      "hosts" : [
      "localhost:27018",
      "localhost:27017"
      ],
      "passives" : [
      "localhost:27019"
      ],
      "primary" : "localhost:27018",
      "passive" : true,
      "maxBsonObjectSize" : 16777216,
      "ok" : 1
      }

      made new config:
      {
      "_id" : "foo",
      "version" : 5,
      "members" : [

      { "_id" : 0, "host" : "dbhost1:27017" }

      ,

      { "_id" : 1, "host" : "dbhost2:27018" }

      ,

      { "_id" : 2, "host" : "dbhost3:27019" }

      ]
      }

      once called reconfig, got ok=1, and no error in logs.
      rs.conf() shows the new config.
      But db.isMaster() or db.serverStatus() still shows old config.
      Eventually restarted master, then it showed the new config.
      Still the non-restarted slave was still showing old config.

      foo:SECONDARY> db.isMaster()
      {
      "setName" : "foo",
      "ismaster" : false,
      "secondary" : true,
      "hosts" : [
      "localhost:27018",
      "localhost:27017"
      ],
      "passives" : [
      "localhost:27019"
      ],
      "primary" : "localhost:27018",
      "passive" : true,
      "maxBsonObjectSize" : 16777216,
      "ok" : 1
      }

      Upon reconfig log showed:
      Thu Feb 24 13:04:27 [conn411] replSet replSetReconfig config object parses ok, 3 members specified
      Thu Feb 24 13:04:27 [conn411] replSet replSetReconfig [2]
      Thu Feb 24 13:04:27 [conn411] replSet info saving a newer config version to local.system.replset
      Thu Feb 24 13:04:27 [conn411] replSet info : additive change to configuration
      Thu Feb 24 13:04:27 [conn411] replSet replSetReconfig new config saved locally
      Thu Feb 24 13:04:27 [conn411] query admin.$cmd ntoreturn:1 command: { replSetReconfig: { _id: "foo", version: 5, members: [

      { _id: 0, host: "dbhost1:27017" }

      ,

      { _id: 1, host: "dbhost2:27018" }

      ,

      { _id: 2, host: "dbhost3:27019" }

      ] } } reslen:53 107ms

      Assuming that once reconfig is successful, all commands should show it.

            Assignee:
            kristina Kristina Chodorow (Inactive)
            Reporter:
            antoine Antoine Girbal
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: