Bug 882673 - NetworkManager sets hostname despite /etc/hostname existing
Summary: NetworkManager sets hostname despite /etc/hostname existing
Keywords:
Status: CLOSED DUPLICATE of bug 831735
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-02 15:51 UTC by Sandro Mani
Modified: 2012-12-04 15:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-04 15:38:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
log_nosysconfig (5.36 KB, application/octet-stream)
2012-12-02 15:51 UTC, Sandro Mani
no flags Details
log_nosysconfig (5.36 KB, application/octet-stream)
2012-12-02 15:54 UTC, Sandro Mani
no flags Details
log_withsysconfig (5.26 KB, application/octet-stream)
2012-12-02 15:55 UTC, Sandro Mani
no flags Details

Description Sandro Mani 2012-12-02 15:51:33 UTC
Created attachment 656073 [details]
log_nosysconfig

Description of problem:
NetworkManager is setting the transient hostname, despite /etc/hostname existing. If HOSTNAME is defined in /etc/sysconfig/network, however, NetworkManager does not change the hostname, which is the expected behaviour.

Version-Release number of selected component (if applicable):
NetworkManager-0.9.7.0-8.git20121004.fc19.x86_64

How reproducible:
Always

Steps to Reproduce:
- Reboot disconnected from network
- After reboot, before connecting to network

# hostname
PC4

# cat /etc/hostname
PC4

# hostnamectl status
   Static hostname: PC4
   Pretty hostname: PC4
         Icon name: computer-laptop
        Machine ID: 0a582bf873c54f23909d47cc0e47e874
           Boot ID: c562ba9f7781436bb63e70bcf3c9247c
  Operating System: Fedora 19 (Rawhide)
       CPE OS Name: cpe:/o:fedoraproject:fedora:19
            Kernel: Linux 3.7.0-0.rc7.git1.2.fc19.x86_64
      Architecture: x86_64

# cat /etc/sysconfig/network
NETWORKING=yes
NTPSERVERARGS=iburst

- After connecting to network

# hostname
Mani

# cat /etc/hostname 
PC4

# hostnamectl status
   Static hostname: PC4
Transient hostname: Mani
   Pretty hostname: PC4
         Icon name: computer-laptop
        Machine ID: 0a582bf873c54f23909d47cc0e47e874
           Boot ID: 0356f5be6c95427e9e785c4bb5f13290
  Operating System: Fedora 19 (Rawhide)
       CPE OS Name: cpe:/o:fedoraproject:fedora:19
            Kernel: Linux 3.7.0-0.rc7.git2.2.fc19.x86_64
      Architecture: x86_64

# cat /etc/sysconfig/network
NETWORKING=yes
NTPSERVERARGS=iburst

Also see attached log_nosysconfig


Actual results:
NetworkManager changes the transient hostname despite the static hostname being set

Expected results:
NetworkManager should only set the hostname if the static hostname does not exist

Additional info:
As noted above, if I change /etc/sysconfig/network to include the hostname:
# cat /etc/sysconfig/network
NETWORKING=yes
NTPSERVERARGS=iburst
HOSTNAME=PC4

NetworkManager will not set the transient hostname (see attached log_withsysconfig)


By the way, "Mani" is what I set in the field "Router name" in the router configuration.

Comment 1 Sandro Mani 2012-12-02 15:54:55 UTC
Created attachment 656076 [details]
log_nosysconfig

Comment 2 Sandro Mani 2012-12-02 15:55:29 UTC
Created attachment 656087 [details]
log_withsysconfig

Comment 3 Jirka Klimes 2012-12-04 15:38:55 UTC
Fixed upstream, should appear in Fedora soon:
http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=a7eb3476557dae28880333544c797705ee2f5b5a

*** This bug has been marked as a duplicate of bug 831735 ***


Note You need to log in before you can comment on or make changes to this bug.