Message "Host registration failed - cannot update Host Name for Host <RHEV-H name>" reported every ~20 seconds in RHEV Manager logs
Environment
- Red Hat Enterprise Virtualization (RHEV) 3.0
Issue
- RHEV GUI shows below error every ~20 seconds.
Host registration failed - cannot update Host Name for Host <fqdn of hypervisor>
- Below Error message is found in
/var/log/rhevm/rhevm.log.
2012-03-14 13:26:04,963 INFO [org.ovirt.engine.core.bll.RegisterVdsQuery] (http-0.0.0.0-8443-8) Running Command: RegisterVds
2012-03-14 13:26:04,998 WARN [org.ovirt.engine.core.bll.UpdateVdsCommand] (pool-11-thread-44) CanDoAction of action UpdateVds failed. Reasons:VALIDATION.VDS.HOSTNAME.HOSTNAME_OR_IP
2012-03-14 13:26:04,999 ERROR [org.ovirt.engine.core.bll.RegisterVdsQuery] (http-0.0.0.0-8443-8) RegisterVdsQuery::HandleOldVdssWithSameHostName - could not update VDS rhevh00.mydomain.lab
2012-03-14 13:26:04,999 ERROR [org.ovirt.engine.core.bll.RegisterVdsQuery] (http-0.0.0.0-8443-8) RegisterVdsQuery::HandleOldVdssWithSameHostName - Fault - ENGINE
2012-03-14 13:26:04,999 ERROR [org.ovirt.engine.core.bll.RegisterVdsQuery] (http-0.0.0.0-8443-8) RegisterVdsQuery::HandleOldVdssWithSameHostName - CanDoAction Fault - VALIDATION.VDS.HOSTNAME.HOSTNAME_OR_IP
2012-03-14 13:26:05,019 ERROR [org.ovirt.engine.core.register.RegisterServlet] (http-0.0.0.0-8443-8) Failed to run RegisterVds.
Resolution
- This was tracked with Bug 822953 and resolved with the release of RHEV 3.1. For information on the advisory, and where to find the updated files please see RHSA-2012:1508-1.
2 Workarounds if unable to upgrade
-
Remove RHEV-Host from RHEV-Manager and register it again, this will remove the old UID based on removed NIC and will cause a new entry to be made in the database with the new UID.
-
Update RHEV-M database manually, change the vds_unique_id for the problematic hypervisor in the vds_static table to reflect the new uuid in the db
- Get the correct uuid from the hypervisor causing the problem:
# `vdsClient -s 0 getVdsCaps | grep uuid`
- Update the database with the
new-uuidobtained in the previous step
# psql -d rhevm -U postgres -c "update vds_static set vds_unique_id = 'new-uuid' where vds_name = 'name';"
Please note that implementing the second work around without involving Red Hat Support is not recommended and unsupported.
Root Cause
-
RHEV-H is trying to register itself again because the ovirtUID is not matching the value in the data base anymore.
-
This problem could arise any time a host has it's NICs removed/replaced and also come up when there was no bonding configured when the hypervisor was registered to RHEV-M and bonding was configured later.
Diagnostic Steps
- Check vds values on RHEV-Manager database dump
- Check the event sequence on vdsm-reg log file
-
Compare vds UIDs
-
This happens because when we create a bond in mode 1, both the slaves will get the mac address of the active slave.
-
vdsm uses some thing as below to generate the uuid:
/bin/echo -e `/bin/bash -c /usr/sbin/dmidecode|/bin/awk ' /UUID/{ print $2; }
' | /usr/bin/tr '\n' '_' && /sbin/ifconfig | /bin/awk '/HWaddr/ {print $NF}' |
/bin/sort | /usr/bin/head --lines=1`
- If the above command is run after creating the bond, it's possible that the earlier mac address used to create the uuid could disappear due to bonding and the first mac address in the sort will be a different mac address. Hence the mismatch in the uuid of the host in db and real time uuid.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
