[SERVER-13335] changing hostname not recognized by mongod Created: 24/Mar/14  Updated: 24/Jan/15  Resolved: 24/Jan/15

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 2.4.1
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Daniel Coupal Assignee: Scott Hernandez (Inactive)
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Steps To Reproduce:
  • take a host in a replica set that is monitored by MMS
  • change the hostname of the machine
  • look at the last ping in MMS, searching for hostname
Participants:

 Description   

The following was observed through the MMS agent.

A replica set lists its members by IP addresses. Unfortunately, 2 hosts had the same hostnames. That did not create any issues from the mongod point of view, but it did confuse the MMS agent, which builds a list of host mappings. The list ended up being a union of the lists from both hosts.

The customer changed the hostname on one of the 2 hosts. The information reported from that host through the last ping in MMS stills shows the old hostname.

If we allow for changing the hostname without restarting mongod (and without reconfiguring the RS) then we have a cached value somewhere of the hostname that is not updated.
If we do not allow changing the hostname without restarting mongod, then it works as expected.



 Comments   
Comment by Ramon Fernandez Marina [ 23/Jan/15 ]

daniel.coupal, if this is still an issue can you please follow up with the information Scott requested above?

Thanks,
Ramón.

Comment by Scott Hernandez (Inactive) [ 05/Dec/14 ]

I'm a little unclear on much of this from your description and repro steps, and also if this has to do with the server or MMS specifically.

  • By change the host name, what do you mean? Change the name the local machine thinks it has or change resolution for the hostname to ip address, or somethings else?
  • Where in the last ping does it show the old hostname? Example please.
Generated at Thu Feb 08 03:31:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.