-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
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" : 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: 1, host: "dbhost2:27018" },
{ _id: 2, host: "dbhost3:27019" }] } } reslen:53 107ms
Assuming that once reconfig is successful, all commands should show it.