Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
None
Description
At http://docs.mongodb.org/manual/tutorial/change-hostnames-in-a-replica-set/#changing-hostnames-while-maintaining-the-replica-set-s-availability, there is an error in step 5. It doesn't make sense to start up the original primary (it's not needed anymore).
I replaced the steps 3-5 with the following for a customer:
...
3. When the step down succeeds, shut down the old primary.
4. Start the node that will replace the old primary in the new location
5. To make the final configuration change, connect to the current primary in the mongo shell and reconfigure the host value to replace the old node with the new one. If the old primary was at position 0, you would run:
cfg = rs.conf()
|
cfg.members[0].host = "mongodb0.example.net:27017"
|
rs.reconfig(cfg)
|
...
Note how step 4 became the new step 5 and the replacement node should be started before the config change to not get errors about it being unreachable.
I think step 1d. should also be changed as the secondary is not always at position 1 in the array. I would make this clearer. Something like "If the old node was at position 1, you would run: ...".