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.

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 1.8.2
    • Component/s: Replication
    • None
    • Environment:
      Solaris 11 (Express)
    • Solaris

      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().

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

              Created:
              Updated:
              Resolved: