Bug 1272376 - Duplicate nova hypervisors after rebooting compute nodes
Duplicate nova hypervisors after rebooting compute nodes
Product: RDO
Classification: Community
Component: rdo-manager (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ---
: Liberty
Assigned To: Hugh Brock
Shai Revivo
Depends On:
  Show dependency treegraph
Reported: 2015-10-16 05:51 EDT by Marius Cornea
Modified: 2017-07-04 11:03 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-07-04 11:03:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Marius Cornea 2015-10-16 05:51:29 EDT
Description of problem:
After rebooting a compute node it will come up with the same hypervisor_hostname but a different service_host. During the deployment the compute node will register using the shortname(e.g overcloud-novacompute-0) as service_host and after reboot it will show up with the long name(e.g overcloud-novacompute-0.localdomain) as service_host. 

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Deploy overcloud with one controller and one compute
2. Reboot the compute node 
3. Check the overcloud nova hypervisor-list

Actual results:
| ID | Hypervisor hostname                 | State | Status   |
| 1  | overcloud-novacompute-0.localdomain | down  | disabled |
| 2  | overcloud-novacompute-0.localdomain | up    | enabled  |

Expected results:
Only one hypervisor would show up.

Additional info:
stack@instack:~>>> nova hypervisor-show 1 | grep host
| host_ip                   |                               |
| hypervisor_hostname       | overcloud-novacompute-0.localdomain      |
| service_host              | overcloud-novacompute-0                  |
stack@instack:~>>> nova hypervisor-show 2 | grep host
| host_ip                   |                               |
| hypervisor_hostname       | overcloud-novacompute-0.localdomain      |
| service_host              | overcloud-novacompute-0.localdomain      |
Comment 1 Marius Cornea 2015-10-16 08:10:38 EDT
I believe during provisioning cloud init will set a transient hostname (the short one) and after reboot the static hostname in /etc/hostname will be used:

[heat-admin@overcloud-novacompute-0 ~]$ curl;echo

[heat-admin@overcloud-novacompute-0 ~]$ cat /etc/hostname 

Not sure if this realtes to our setup but this behavior was described in this bug:
Comment 4 Christopher Brown 2017-06-17 15:00:51 EDT
Ugh, yeah, this has been going on forever.
The current fix is:


which is namely:

echo "preserve_hostname: true" > /etc/cloud/cloud.cfg.d/99_hostname.cfg

on firstboot

but I think this can be closed unless we want to make the above fix permanent?

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