View Issue Details

IDProjectCategoryView StatusLast Update
0005803CentOS-6-OTHERpublic2012-06-30 21:00
Reportertheosib 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Platformx86 32-bitOSCentOSOS Version6.2
Product Version6.2 
Target VersionFixed in Version 
Summary0005803: Network daemons cache hostname in obscure place, revert to old value after network services restart
DescriptionIf you want to change your hostname on-line, there are two things to do. One is to use the 'hostname' command. And the other is to edit '/etc/sysconfig/network'. However, there appears to be a third, because even when doing those, I can cause the hostname to revert temporarily to the old value by resetting the network.
Steps To ReproduceProcedure A:

1. Start out with the hostname set to "old"
2. Halt the machine
3. Unplug the ethernet cable
4. Boot up without ethernet
5. Plug in ethernet and let NetworkManager configure the network
6. Command: hostname "new"
7. Edit '/etc/sysconfig/network' to change hostname to "new"

At this point, if you type 'hostname' or in any way look up the hostname, you will get 'new'. However...

8. Restart the network system service (e,g, "/etc/init.d/network restart" or equivalent).

If you type 'hostname' after this point, it will report 'old'.

If the ethernet cable steps are not part of the procedure, the problem does not manifest. If I reboot after the last step, then the hostname is set to "new".


Procedure B:

1. Start out with the hostname set to "old"
2. Halt
3. Unplug the ethernet cable
4. Boot up without ethernet
5. Plug in ethernet and let NetworkManager configure the network
6. Stop the network system service
7. Command: hostname "new"
8. Edit '/etc/sysconfig/network' to change hostname to "new"
9. Start the network system service

The effect here is identical to the above.
TagsNo tags attached.

Activities

theosib

theosib

2012-06-30 16:56

reporter   ~0015352

BTW, although a reboot fixes the problem, that shouldn't be considered a solution. *NIX sysadmins generally frown upon having to reboot for minor adjustments. Also, I realize this bug seems obscure from the outset, but due to the appliance nature of the devices where we're using CentOS, this bug manifests constantly, and it's a major nuisance.
tigalch

tigalch

2012-06-30 21:00

manager   ~0015354

The same question can be found in the forum:
https://www.centos.org/modules/newbb/viewtopic.php?topic_id=38024&forum=58

Issue History

Date Modified Username Field Change
2012-06-30 16:53 theosib New Issue
2012-06-30 16:56 theosib Note Added: 0015352
2012-06-30 21:00 tigalch Note Added: 0015354