Hide Forgot
Description of problem: The hostname shown in cockpit in not the same between login page and host page. In login page, the server name is the same as the output as #hostname in node. But in host page, the hostname is the same as the output as /etc/hostname. Version-Release number of selected component (if applicable): ovirt-node-ng-installer-ovirt-3.6-2016042323.iso cockpit-0.103-1.el7.centos.x86_64 cockpit-ovirt-0.5.1-0.0.master.el7.centos.noarch How reproducible: 100% Steps to Reproduce: 1. Anaconda install NGN 4.0. 2. Start cockpit service. 3. Change the hostname in node side by #echo "test.redhat.com" > /etc/hostname. 4. Change the hostname in node side using command #hostname ltest.redhat.com" 5. Check in cockpit with fresh login. Actual results: 1. After step4, login page shows "Server: ltest.redhat.com". 2. After step5, host page shows "Host Name test.redhat.com". Expected results: 1. The hostname in cockpit should be same between login page and host page. Additional info:
What does the hostnamectl command say? This is where Cockpit gets the information about the host name.
(In reply to Stef Walter from comment #1) > What does the hostnamectl command say? This is where Cockpit gets the > information about the host name. # hostnamectl Static hostname: test.redhat.com Pretty hostname: test Transient hostname: ltest.redhat.com Icon name: computer-desktop Chassis: desktop Machine ID: aedcf54a9c5d4e87b19123ee38fc653b Boot ID: 6fdeb36ea0cf4479b5310153686897a4 Operating System: oVirt Node 3.6.5_master CPE OS Name: cpe:/o:centos:centos:7 Kernel: Linux 3.10.0-327.13.1.el7.x86_64 Architecture: x86-64
Marius, do you think we should show the transient host name in the server page when it differs from the static host name?
> do you think we should show the transient host name in the server page when it differs from the static host name? Shouldn't the static hostname take precedence always? I think I remember a change you made to systemd to that effect, no?
Stef, https://github.com/systemd/systemd/commit/c779a44222161155c039a7fd2fd304c006590ac7 Based on that I'd say that the login page should use the static hostname.
Is the problem here maybe that the "#hostname ..." thing changes the kernel hostname directly? This is not supported anymore with systemd. Everyone must go via hostnamed.
> the "#hostname ..." thing Ahh, that's just /usr/bin/hostname.
Marius, I agree. If someone calls hostname, instead of hostnamectl to change the hostname they've gone "off road" and get to keep both pieces. I would suggest closing this with WONTFIX.
> If someone calls hostname, instead of hostnamectl to change the hostname they've gone "off road" and get to keep both pieces. Yeah, that's the new rule apparently. Is it documented somewhere? https://www.freedesktop.org/wiki/Software/systemd/hostnamed/ doesn't really mention it.
It's documented here: http://cockpit-project.org/guide/latest/feature-systemd.html Should we make it more explicit?