Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-1205

Procedure on "Change Hostnames in a Replica Set" has an error

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 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: ...".

      Attachments

        Activity

          People

            bgrabar Bob Grabar
            thomas.rueckstiess@mongodb.com Thomas Rueckstiess
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10 years, 23 weeks ago