foo:PRIMARY> rs.conf()
{
"_id" : "foo",
"version" : 2,
"members" : [
{
"_id" : 0,
"host" : "erh-mb5-2.local:27017"
}
]
}
foo:PRIMARY> x = rs.conf()
{
"_id" : "foo",
"version" : 2,
"members" : [
{
"_id" : 0,
"host" : "erh-mb5-2.local:27017"
}
]
}
foo:PRIMARY> x.settings = { chainingAllowed : false }
{ "chainingAllowed" : false }
foo:PRIMARY> x
{
"_id" : "foo",
"version" : 2,
"members" : [
{
"_id" : 0,
"host" : "erh-mb5-2.local:27017"
}
],
"settings" : {
"chainingAllowed" : false
}
}
foo:PRIMARY> rs.reconfig(x)
{ "ok" : 1 }
foo:PRIMARY> rs.conf()
{
"_id" : "foo",
"version" : 3,
"members" : [
{
"_id" : 0,
"host" : "erh-mb5-2.local:27017"
}
]
}
foo:PRIMARY>