Description of problem: Hostname is changed to localhost after RHEV-H reboot. **This issue can cause VMs on RHEV-H migration failed, impact Hosted Engine migration to another host** Version-Release number of selected component (if applicable): # rpm -qa ovirt-node vdsm kernel vdsm-4.16.24-2.el7ev.x86_64 kernel-3.10.0-229.11.1.el7.x86_64 ovirt-node-3.2.3-18.el7.noarch # cat /etc/rhev-hypervisor-release Red Hat Enterprise Virtualization Hypervisor release 7.1 (20150813.0.el7ev) How reproducible: 100% Steps to Reproduce: 1. Installed rhevh. set hostname: dhcp-11-107.nay.redhat.com 2. Reboot RHEV-H 3. After reboot, login RHEV-H 4. check the hostname Actual results: the hostname is changed to localhost. Expected results: Do not change hostname on rhevh after reboot rhevh with HE. Additional info: # after reboot rhevh 1. # hostname --all-fqdn dhcp-11-107.nay.redhat.com 2. # hostname localhost 3. /var/log/message <snip> Aug 18 11:00:54 dhcp-11-167 systemd[1]: systemd 208 running in system mode. (+PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ) Aug 18 11:00:54 dhcp-11-167 systemd[1]: Running in initial RAM disk. Aug 18 11:00:54 dhcp-11-167 systemd[1]: No hostname configured. Aug 18 11:00:54 dhcp-11-167 systemd[1]: Set hostname to <localhost>. Aug 18 11:00:54 dhcp-11-167 systemd[1]: Initializing machine ID from random generator. Aug 18 11:00:54 dhcp-11-167 systemd[1]: Starting -.slice. Aug 18 11:00:54 dhcp-11-167 systemd[1]: Created slice -.slice. </snip>
Expected results: Do not change hostname on rhevh after reboot rhevh.
Created attachment 1064306 [details] rhevh_var_log
Created attachment 1064307 [details] sosreport from node
Hi Ying, (In reply to Ying Cui from comment #0) > Description of problem: > Hostname is changed to localhost after RHEV-H reboot. > > **This issue can cause VMs on RHEV-H migration failed, impact Hosted Engine > migration to another host** > > > Version-Release number of selected component (if applicable): > # rpm -qa ovirt-node vdsm kernel > vdsm-4.16.24-2.el7ev.x86_64 > kernel-3.10.0-229.11.1.el7.x86_64 > ovirt-node-3.2.3-18.el7.noarch > # cat /etc/rhev-hypervisor-release > Red Hat Enterprise Virtualization Hypervisor release 7.1 (20150813.0.el7ev) > > How reproducible: > 100% > > > Steps to Reproduce: > 1. Installed rhevh. > set hostname: dhcp-11-107.nay.redhat.com > 2. Reboot RHEV-H > 3. After reboot, login RHEV-H > 4. check the hostname > > Actual results: > the hostname is changed to localhost. > > Expected results: > Do not change hostname on rhevh after reboot rhevh with HE. > > Additional info: > # after reboot rhevh > 1. > # hostname --all-fqdn > dhcp-11-107.nay.redhat.com > > 2. > # hostname > localhost > > 3. /var/log/message > <snip> > Aug 18 11:00:54 dhcp-11-167 systemd[1]: systemd 208 running in system mode. > (+PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL > +XZ) > Aug 18 11:00:54 dhcp-11-167 systemd[1]: Running in initial RAM disk. > Aug 18 11:00:54 dhcp-11-167 systemd[1]: No hostname configured. > Aug 18 11:00:54 dhcp-11-167 systemd[1]: Set hostname to <localhost>. > Aug 18 11:00:54 dhcp-11-167 systemd[1]: Initializing machine ID from random > generator. > Aug 18 11:00:54 dhcp-11-167 systemd[1]: Starting -.slice. > Aug 18 11:00:54 dhcp-11-167 systemd[1]: Created slice -.slice. > </snip> I couldn't reproduce it using rhev-h20150813.0.el7ev but in master I saw it happening (Patch attached). My steps: - Install manually rhev-h20150813.0.el7ev - Setup hostname via TUI - Reboot the node * Hostname is OK or - Install manually rhev-h20150813.0.el7ev - Setup hostname via TUI - Setup Network (DHCP or Static IP) - Reboot the node * Hostname is OK Probably, I am missing some part of your reproducer. Could you please review the steps above? Are you using real machine or virtual machine for this test? Thanks!
*** Bug 1254425 has been marked as a duplicate of this bug. ***
Douglas, after I extend testing on this bug, here need to add more info to reproduce this bug. > - Install manually rhev-h20150813.0.el7ev > - Setup hostname via TUI > - Setup Network (DHCP or Static IP) I set fqdn hostname automatically during setuping network via dhcp. I did not set hostname manually. Steps to Reproduce: 1. Installed rhevh. 2. Setup network via dhcp 3. After network setup, the hostname is set automatically. hostname: dhcp-11-107.nay.redhat.com 4. Reboot RHEV-H 5. After reboot, login RHEV-H 6. check the hostname > - Reboot the node > * Hostname is OK > > Probably, I am missing some part of your reproducer. Could you please review > the steps above? Are you using real machine or virtual machine for this test? I tested this issue on one Dell machine and two HP machines, all are real machines. Thanks.
lower the severity to high, actually we can set hostname manually to avoid this issue happen.
(In reply to Ying Cui from comment #6) > Douglas, after I extend testing on this bug, here need to add more info to > reproduce this bug. > > > - Install manually rhev-h20150813.0.el7ev > > - Setup hostname via TUI > > - Setup Network (DHCP or Static IP) > > I set fqdn hostname automatically during setuping network via dhcp. > I did not set hostname manually. > > Steps to Reproduce: > 1. Installed rhevh. > 2. Setup network via dhcp > 3. After network setup, the hostname is set automatically. > hostname: dhcp-11-107.nay.redhat.com > 4. Reboot RHEV-H > 5. After reboot, login RHEV-H > 6. check the hostname > > > > - Reboot the node > > * Hostname is OK > > > > Probably, I am missing some part of your reproducer. Could you please review > > the steps above? Are you using real machine or virtual machine for this test? > > I tested this issue on one Dell machine and two HP machines, all are real > machines. Thanks. Thanks for the clarification. I was able to reproduce it. I will be investigating this report. It's different from the one I have found in master.
Moving this to 3.6 for now, as we don#t have any more insights, except that it is also related to the DHCP setup in the network.
*** This bug has been marked as a duplicate of bug 1232338 ***
(In reply to Fabian Deutsch from comment #11) > > *** This bug has been marked as a duplicate of bug 1232338 *** Fabian, we need to reconsider this bug. In this bug, the hostname getting from dhcp is changed to localhost after rhevh el7 reboot, don't register host to rhevm yet. And 100% reproduced, consider the valid fix should be in node side. In bug 1232338, see the bug description, the hostname is broken after several time host reboot.
Is this the issue described in bug 1241712?
(In reply to Fabian Deutsch from comment #14) > Is this the issue described in bug 1241712? From the bug 1241712 description, it is very like this bug. But I can NOT reproduce this issue on RHEL 7.2, I only can reproduce it on RHEV-H 7.x.
Works for me on Red Hat Enterprise Virtualization Hypervisor (Beta) release 7.2 (20160113.0.el7ev), following these steps: 1. Installed rhevh. set hostname: dhcp-11-107.nay.redhat.com 2. Reboot RHEV-H 3. After reboot, login RHEV-H 4. check the hostname
Findings from a run where I added set -x to ovirt-init-script: Jan 29 09:42:23 localhost ovirt-init-functions.sh[1501]: + '[' -f /etc/sysconfig/network ']' Jan 29 09:42:23 localhost ovirt-init-functions.sh[1501]: + . /etc/sysconfig/network Jan 29 09:42:23 localhost ovirt-init-functions.sh[1501]: ++ NETWORKING=yes Jan 29 09:42:23 localhost ovirt-init-functions.sh[1501]: ++ NETWORKING_IPV6=no Jan 29 09:42:23 localhost ovirt-init-functions.sh[1501]: + '[' -n localhost ']' Jan 29 09:42:23 localhost ovirt-init-functions.sh[1501]: + hostname localhost This shows that in the init-script HOSTNAME is set to 'localhost' in the env of the script, but it's not set in the /etc/sysconfig/network file.
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions
fyi, this causes following: libvirtError: internal error: Attempt to migrate guest to the same host localhost Thread-430::DEBUG::2016-03-29 13:49:12,911::__init__::206::jsonrpc.Notification::(emit) Sending event {"params": {"a7df4022-42c5-47b6-aba2-189c47f9fef7": {"status": "Migration Source"}, "notify_time": 4298245620}, "jsonrpc": "2.0", "method": "|virt|VM_status|a7df4022-42c5-47b6-aba2-189c47f9fef7"} Thread-430::ERROR::2016-03-29 13:49:12,912::migration::309::virt.vm::(run) vmId=`a7df4022-42c5-47b6-aba2-189c47f9fef7`::Failed to migrate Traceback (most recent call last): File "/usr/share/vdsm/virt/migration.py", line 297, in run self._startUnderlyingMigration(time.time()) File "/usr/share/vdsm/virt/migration.py", line 363, in _startUnderlyingMigration self._perform_migration(duri, muri) File "/usr/share/vdsm/virt/migration.py", line 402, in _perform_migration self._vm._dom.migrateToURI3(duri, params, flags) File "/usr/share/vdsm/virt/virdomain.py", line 68, in f ret = attr(*args, **kwargs) File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line 124, in wrapper ret = f(*args, **kwargs) File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 1313, in wrapper return func(inst, *args, **kwargs) File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1836, in migrateToURI3 if ret == -1: raise libvirtError ('virDomainMigrateToURI3() failed', dom=self) libvirtError: internal error: Attempt to migrate guest to the same host localhost
This issue will not be fixed with an eventually attached in RHEV 4.0. Instead this bug is getting fixed by the new functionality in Cockpit.
Encounter this bug on rhev-hypervisor6-6.8-20160630.2.iso, added this bug to: Bug 1352452 - [Tracker] Track RHEV-H 6.8 bugs