-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.6.3
-
Component/s: Replication
-
None
-
Environment:Linux 64, MacOS 64
-
ALL
> rs.initiate({_id: 'test',
... members: [
... {_id: 0, host: 'localhost:27017'},
... {_id: 1, host: 'localhost:27018'},
... {_id: 2, host: 'localhost:27019', arbiterOnly: true}
... ]})
{
"info" : "Config now saved locally. Should come online in about a minute.",
"ok" : 1
}
> rs.conf()
{
"_id" : "test",
"version" : 1,
"members" : [
,
,
{ "_id" : 2, "host" : "localhost:27019", "arbiterOnly" : true } ]
}
> rs.status()
{
"set" : "test",
"date" : "Tue Oct 12 2010 19:00:24 GMT+0400 (MSD)",
"myState" : 1,
"members" : [
,
,
{ "_id" : 2, "name" : "localhost:27019", "health" : 1, "state" : 7, "uptime" : 41, "lastHeartbeat" : "Tue Oct 12 2010 19:00:23 GMT+0400 (MSD)", "errmsg" : "." } ],
"ok" : 1
}
*****************
> db.runCommand( { replSetReconfig: {_id: 'test',
... version: 2,
... members: [
... {_id: 0, host: 'localhost:27017'},
... {_id: 1, host: 'localhost:27018'},
... {_id: 2, host: 'localhost:27019', priority: 0}
... ]} })
> rs.conf()
{
"_id" : "test",
"version" : 2,
"members" : [
,
,
{ "_id" : 2, "host" : "localhost:27019", "priority" : 0 } ]
}
> rs.status()
{
"set" : "test",
"date" : "Tue Oct 12 2010 19:02:28 GMT+0400 (MSD)",
"myState" : 1,
"members" : [
,
,
{ "_id" : 2, "name" : "localhost:27019", "health" : 1, "state" : 7, "uptime" : 32, "lastHeartbeat" : "Tue Oct 12 2010 19:02:26 GMT+0400 (MSD)", "errmsg" : "." } ],
"ok" : 1
}