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): openstack-tripleo-heat-templates-0.8.7-dev284.el7.centos.noarch How reproducible: 100% 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 | 192.0.2.19 | | hypervisor_hostname | overcloud-novacompute-0.localdomain | | service_host | overcloud-novacompute-0 | stack@instack:~>>> nova hypervisor-show 2 | grep host | host_ip | 192.0.2.19 | | hypervisor_hostname | overcloud-novacompute-0.localdomain | | service_host | overcloud-novacompute-0.localdomain |
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 http://169.254.169.254/2007-01-19/meta-data/public-hostname;echo overcloud-novacompute-0 [heat-admin@overcloud-novacompute-0 ~]$ cat /etc/hostname overcloud-novacompute-0.localdomain Not sure if this realtes to our setup but this behavior was described in this bug: https://bugs.launchpad.net/cloud-init/+bug/1246485
Ugh, yeah, this has been going on forever. The current fix is: http://blog.nemebean.com/content/prevent-cloud-init-changing-your-hostname-reboot 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?