Crag posted a patch here: https://github.com/redhat-openstack/astapor/pull/454
Important, after talking with Fabio di Nitto, we found the provided workaround into the first comment is risky: Use this one, otherwise it could cause problems to pacemaker: dig A $(hostname) | grep -A1 "ANSWER SEC" | tail -n 1 | awk '{print $NF " " $1}' | sed -e 's/.$//g' >>/etc/hosts ; grep $(hostname) /etc/hosts || echo "Failure setting up the hostname entry" Setting the needinfo to get an ack on this comment
After seeing the /etc/hosts posted by Crag on github: https://github.com/redhat-openstack/astapor/pull/454 I suspect we may not need this fix when deployed from foreman, is the /etc/hosts always populated like that? we just need a resolving $(hostname) entry in /etc/hosts
Actually, that paste from /etc/hosts was not a staypuft install but from one of my development VM's using foreman (just wanted to illustrate the last line being added). This is /etc/hosts from a staypuft install: [root@maca25400702876 ~]# cat /etc/hosts # HEADER: This file was autogenerated at 2015-01-14 10:30:46 -0500 # HEADER: by puppet. While it can still be managed manually, it # HEADER: is definitely not recommended. 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.0.7 lb-backend-maca25400702875 192.168.0.9 lb-backend-maca25400702877 192.168.0.8 pcmk-maca25400702876 192.168.0.9 pcmk-maca25400702877 192.168.0.7 pcmk-maca25400702875 192.168.0.8 lb-backend-maca25400702876 [root@maca25400702876 ~]# hostname maca25400702876.example.com So, I think we still need a patch.
(In reply to Crag Wolfe from comment #6) > Actually, that paste from /etc/hosts was not a staypuft install but from one > of my development VM's using foreman (just wanted to illustrate the last > line being added). This is /etc/hosts from a staypuft install: > > [root@maca25400702876 ~]# cat /etc/hosts > # HEADER: This file was autogenerated at 2015-01-14 10:30:46 -0500 > # HEADER: by puppet. While it can still be managed manually, it > # HEADER: is definitely not recommended. > 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 > ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 > 192.168.0.7 lb-backend-maca25400702875 > 192.168.0.9 lb-backend-maca25400702877 > 192.168.0.8 pcmk-maca25400702876 > 192.168.0.9 pcmk-maca25400702877 > 192.168.0.7 pcmk-maca25400702875 > 192.168.0.8 lb-backend-maca25400702876 > [root@maca25400702876 ~]# hostname > maca25400702876.example.com > > So, I think we still need a patch. Thank you for checking that Crag, please use the "dig" version or something equivalent, we need to put the real IP instead of 127.0.0.1 dig A $(hostname) | grep -A1 "ANSWER SEC" | tail -n 1 | awk '{print $NF " " $1}' | sed -e 's/.$//g' >>/etc/hosts ; grep $(hostname) /etc/hosts || echo "Failure setting up the hostname entry"
Tested and merged updated patch.
Verified: Environment: ruby193-rubygem-foreman_openstack_simplify-0.0.6-8.el7ost.noarch openstack-foreman-installer-3.0.11-1.el7ost.noarch ruby193-rubygem-staypuft-0.5.15-1.el7ost.noarch rhel-osp-installer-client-0.5.5-2.el7ost.noarch openstack-puppet-modules-2014.2.8-2.el7ost.noarch rhel-osp-installer-0.5.5-2.el7ost.noarch Verified the output from `hostname` actually exists in the /etc/hosts file next to its IP on all controllers.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-0156.html