Bug 1156496

Summary: hostnamectl -H returns partial incorrect data from remote host
Product: Red Hat Enterprise Linux 7 Reporter: Reartes Guillermo <greartes>
Component: systemdAssignee: systemd-maint
Status: CLOSED ERRATA QA Contact: Branislav Blaškovič <bblaskov>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.1CC: bblaskov, jscotka, lnykryn, systemd-maint-list
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: systemd-219-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 14:58:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Reartes Guillermo 2014-10-24 15:03:21 UTC
Description of problem:

When one executes a hostnamectl with the -H parameters, only some fields do display the remote system. Most fields do still show the local system instead of the remote one. 

Version-Release number of selected component (if applicable):
For RHEL7: 208-11.el7 (and for Fedora20: 208-22.fc20) 


How reproducible:
always

Steps to Reproduce:

FROM RHEL7 HOST:

[root@demo7-1 ~]# hostname
demo7-1.example.com

[root@demo7-1 ~]# hostnamectl 
   Static hostname: demo7-1.example.com
         Icon name: computer-laptop
           Chassis: laptop
        Machine ID: 4b8fe8138b3944bdb3c3a6a2ecdf9a9a
           Boot ID: 8f6caf4f2ce8434e9c451011a5b0371a
    Virtualization: kvm
  Operating System: Red Hat Enterprise Linux
       CPE OS Name: cpe:/o:redhat:enterprise_linux:7.0:GA:server
            Kernel: Linux 3.10.0-123.4.2.el7.x86_64
      Architecture: x86_64

[root@demo7-1 ~]# hostnamectl -H root
root's password: 
   Static hostname: grimjow.espada
         Icon name: computer-laptop
           Chassis: laptop
        Machine ID: 4b8fe8138b3944bdb3c3a6a2ecdf9a9a
           Boot ID: 8f6caf4f2ce8434e9c451011a5b0371a
    Virtualization: kvm
  Operating System: Red Hat Enterprise Linux
       CPE OS Name: cpe:/o:redhat:enterprise_linux:7.0:GA:server
            Kernel: Linux 3.10.0-123.4.2.el7.x86_64
      Architecture: x86_64

FROM F20 HOST:

[root@grimjow ~]# hostname
grimjow.espada

[root@grimjow ~]# hostnamectl 
   Static hostname: grimjow.espada
         Icon name: computer-laptop
           Chassis: laptop
        Machine ID: 7d9106ca5beb40268ef7cd272251a4d2
           Boot ID: e469a74fb46144ba9b42f420ed651688
  Operating System: Fedora 20 (Heisenbug)
       CPE OS Name: cpe:/o:fedoraproject:fedora:20
            Kernel: Linux 3.16.6-200.fc20.x86_64
      Architecture: x86_64

[root@grimjow ~]# hostnamectl -H root.205.61
root.205.61's password: 
   Static hostname: demo7-1.example.com
         Icon name: computer-laptop
           Chassis: laptop
        Machine ID: 7d9106ca5beb40268ef7cd272251a4d2
           Boot ID: e469a74fb46144ba9b42f420ed651688
  Operating System: Fedora 20 (Heisenbug)
       CPE OS Name: cpe:/o:fedoraproject:fedora:20
            Kernel: Linux 3.16.6-200.fc20.x86_64
      Architecture: x86_64


Actual results:

Only the fiedls: static hostname, Icon name, Chassis
are correct. The other fields does still show the local system instead of the remote one.

Expected results:

When executing hostnamectl with -H parameter, all field should shouw the remote system values instead of the local one.

Additional info:

Comment 2 Reartes Guillermo 2015-03-18 13:48:01 UTC
It is still an issue with RHEL 7.1

[root@rhsat6-vmt2 ~]# hostnamectl -H root.205.1
root.205.1's password: 
   Static hostname: grimjow.espada
         Icon name: computer-laptop
           Chassis: laptop
        Machine ID: 30f7482c55d94c91a5dbb76ee70b09f8
           Boot ID: e93b7ccf53874dcd89199383e79ac04d
    Virtualization: kvm
  Operating System: Employee SKU
       CPE OS Name: cpe:/o:redhat:enterprise_linux:7.0:GA:server
            Kernel: Linux 3.10.0-229.el7.x86_64
      Architecture: x86_64

[root@rhsat6-vmt2 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.1 (Maipo)

[root@rhsat6-vmt2 ~]# hostnamectl 
   Static hostname: rhsat6-vmt2.espada
         Icon name: computer
           Chassis: n/a
        Machine ID: 30f7482c55d94c91a5dbb76ee70b09f8
           Boot ID: e93b7ccf53874dcd89199383e79ac04d
    Virtualization: kvm
  Operating System: Employee SKU
       CPE OS Name: cpe:/o:redhat:enterprise_linux:7.0:GA:server
            Kernel: Linux 3.10.0-229.el7.x86_64
      Architecture: x86_64

This is from a F20 host:

[root@grimjow ~]# hostnamectl 
   Static hostname: grimjow.espada
         Icon name: computer-laptop
           Chassis: laptop
        Machine ID: 7d9106ca5beb40268ef7cd272251a4d2
           Boot ID: 91cca7e8ee84485b836fa84788cadb80
  Operating System: Fedora 20 (Heisenbug)
       CPE OS Name: cpe:/o:fedoraproject:fedora:20
            Kernel: Linux 3.18.7-100.fc20.x86_64
      Architecture: x86_64

[root@grimjow ~]# hostnamectl -H root 
root's password: 
   Static hostname: rhsat6-vmt2.espada
         Icon name: computer
           Chassis: n/a
        Machine ID: 7d9106ca5beb40268ef7cd272251a4d2
           Boot ID: 91cca7e8ee84485b836fa84788cadb80
  Operating System: Fedora 20 (Heisenbug)
       CPE OS Name: cpe:/o:fedoraproject:fedora:20
            Kernel: Linux 3.18.7-100.fc20.x86_64
      Architecture: x86_64

Comment 3 Lukáš Nykrýn 2015-03-18 14:20:08 UTC
Ugh, this looks like a bug in TRANSPORT_SSH.
I would rather leave this to rebase in rhel-7.2. With newer systemd this seems to work.

Comment 6 Lukáš Nykrýn 2015-04-21 13:50:58 UTC
This should be now fixed with the rebase.

Comment 8 Branislav Blaškovič 2015-08-18 11:25:44 UTC
Testing computer:
   Static hostname: bblaskov.brq.redhat.com
         Icon name: computer-laptop
           Chassis: laptop
        Machine ID: 4376e99731a446a1ac7ac3f348454664
           Boot ID: 9e0b44f13c794d489055cfd73ca19ef4
  Operating System: Employee SKU
       CPE OS Name: cpe:/o:redhat:enterprise_linux:7.2:beta:workstation
            Kernel: Linux 3.10.0-229.el7.x86_64
      Architecture: x86-64

OLD PACKAGE:
# rpm -q systemd
systemd-208-20.el7.x86_64
# hostnamectl -H bblaskov.redhat.com
   Static hostname: bblaskov.brq.redhat.com
         Icon name: computer-laptop
           Chassis: laptop
        Machine ID: d20fb34accd74a158e40457bf1d641bf
           Boot ID: 0ac09c7ab7ba4ed08f97d3141fa57883
    Virtualization: kvm
  Operating System: Red Hat Enterprise Linux Server 7.1 (Maipo)
       CPE OS Name: cpe:/o:redhat:enterprise_linux:7.1:GA:server
            Kernel: Linux 3.10.0-229.el7.x86_64
      Architecture: x86_64

NEW PACKAGE:
# rpm -q systemd
systemd-219-11.el7.x86_64
# hostnamectl -H bblaskov.redhat.com
   Static hostname: bblaskov.brq.redhat.com
         Icon name: computer-laptop
           Chassis: laptop
        Machine ID: d20fb34accd74a158e40457bf1d641bf
           Boot ID: edcef7388be04ba0a65ef595e680c709
  Operating System: Employee SKU
       CPE OS Name: cpe:/o:redhat:enterprise_linux:7.2:beta:workstation
            Kernel: Linux 3.10.0-229.el7.x86_64
      Architecture: x86-64

=> VERIFIED.

Comment 9 errata-xmlrpc 2015-11-19 14:58:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2092.html