Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3507

Changing hostname in Replica Set configuration, does not affect rs.status(), until a server restart.

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • None
    • 1.8.2
    • Replication
    • None
    • Solaris 11 (Express)
    • Solaris

    Description

      When initiating a replica set using rs.initiate(), the resulting rs.conf() object has the local hostname in it. When changing it to the fully qualified domain name using this method:

      conf = rs.conf()
      conf.members[0].host = "fully.qualified.domain.com:27017"
      rs.reconfigure(conf)

      the resulting rs.conf() object is updated with the new domain name. Alas, rs.status() reports the old hostname.
      After a server restart, the rs.status() command reports the right values.

      This problem affects, for example, connecting java clients to the server which need the FQDN to function. These read the slave/master information from the replica status object, and pay no attention to rs.conf().

      Attachments

        Activity

          People

            Unassigned Unassigned
            shlomoid Shlomo Priymak
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: