Hide Forgot
Description of problem: When customizing domain name, overcloud deploy fails. Version-Release number of selected component (if applicable): RHEL OSP7 OSP director 7.3 overcloud image 7.3.1 [stack@director01 tht]$ rpm -qf /usr/share/openstack-tripleo-heat-templates/puppet/controller-puppet.yaml openstack-tripleo-heat-templates-0.8.6-123.el7ost.noarch How reproducible: Always Steps to Reproduce: 1. Set domain name in network-environment.yaml like this: > parameter_defaults: > CloudDomain: "example.com" > ControllerHostnameFormat: "controller%index%" > ComputeHostnameFormat: "compute%index%" 2. Run openstack overcloud deploy. Actual results: Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: dib-run-parts Wed Mar 23 03:12:28 JST 2016 Running /usr/libexec/os-refresh-config/configure.d/51-hosts Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + set -o pipefail Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: ++ os-apply-config --key hosts --type raw --key-default '' Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: ++ tr '[A-Z]' '[a-z]' Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + ENTRIES='10.3.20.62 compute0.example.com compute0 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.63 controller0.localdomain controller0 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.64 controller1.localdomain controller1 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.65 controller2.localdomain controller2' Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + '[' '!' -z '10.3.20.62 compute0.example.com compute0 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.63 controller0.localdomain controller0 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.64 controller1.localdomain controller1 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.65 controller2.localdomain controller2' ']' Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: ++ lsb_release -is Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: ++ tr -s '[A-Z]' '[a-z]' Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + DIST=redhatenterpriseserver Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + case $DIST in Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + name=redhat Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + write_entries /etc/cloud/templates/hosts.redhat.tmpl '10.3.20.62 compute0.example.com compute0 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.63 controller0.localdomain controller0 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.64 controller1.localdomain controller1 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.65 controller2.localdomain controller2' Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + local file=/etc/cloud/templates/hosts.redhat.tmpl Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + local 'entries=10.3.20.62 compute0.example.com compute0 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.63 controller0.localdomain controller0 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.64 controller1.localdomain controller1 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.65 controller2.localdomain controller2' Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + '[' '!' -f /etc/cloud/templates/hosts.redhat.tmpl ']' Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + grep -q '^# HEAT_HOSTS_START' /etc/cloud/templates/hosts.redhat.tmpl Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: ++ mktemp Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + temp=/tmp/tmp.fakUiy9ckI Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + awk -v 'v=10.3.20.62 compute0.example.com compute0 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.63 controller0.localdomain controller0 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.64 controller1.localdomain controller1 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.65 controller2.localdomain controller2' '/^# HEAT_HOSTS_START/ { Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: print $0 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: print v Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: f=1 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: }f &&!/^# HEAT_HOSTS_END$/{next}/^# HEAT_HOSTS_END$/{f=0}!f' /etc/cloud/templates/hosts.redhat.tmpl Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + echo 'INFO: Updating hosts file /etc/cloud/templates/hosts.redhat.tmpl, check below for changes' Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: INFO: Updating hosts file /etc/cloud/templates/hosts.redhat.tmpl, check below for changes Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + diff /etc/cloud/templates/hosts.redhat.tmpl /tmp/tmp.fakUiy9ckI Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + cat /tmp/tmp.fakUiy9ckI Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + write_entries /etc/hosts '10.3.20.62 compute0.example.com compute0 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.63 controller0.localdomain controller0 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.64 controller1.localdomain controller1 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.65 controller2.localdomain controller2' Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + local file=/etc/hosts Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + local 'entries=10.3.20.62 compute0.example.com compute0 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.63 controller0.localdomain controller0 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.64 controller1.localdomain controller1 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.65 controller2.localdomain controller2' Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + '[' '!' -f /etc/hosts ']' Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + grep -q '^# HEAT_HOSTS_START' /etc/hosts Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: ++ mktemp Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + temp=/tmp/tmp.Mp6wowB61J Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + awk -v 'v=10.3.20.62 compute0.example.com compute0 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.63 controller0.localdomain controller0 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.64 controller1.localdomain controller1 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: 10.3.20.65 controller2.localdomain controller2' '/^# HEAT_HOSTS_START/ { Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: print $0 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: print v Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: f=1 Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: }f &&!/^# HEAT_HOSTS_END$/{next}/^# HEAT_HOSTS_END$/{f=0}!f' /etc/hosts Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + echo 'INFO: Updating hosts file /etc/hosts, check below for changes' Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: INFO: Updating hosts file /etc/hosts, check below for changes Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + diff /etc/hosts /tmp/tmp.Mp6wowB61J Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: + cat /tmp/tmp.Mp6wowB61J Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: dib-run-parts Wed Mar 23 03:12:28 JST 2016 51-hosts completed Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: dib-run-parts Wed Mar 23 03:12:28 JST 2016 Running /usr/libexec/os-refresh-config/configure.d/55-heat-config Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: [2016-03-23 03:12:28,360] (heat-config) [WARNING] Skipping config 1ba2e3be-9edf-4b21-bb84-7cdc826f6148, already deployed Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: [2016-03-23 03:12:28,360] (heat-config) [WARNING] To force-deploy, rm /var/lib/heat-config/deployed/1ba2e3be-9edf-4b21-bb84-7cdc826f6148.json Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: [2016-03-23 03:12:28,360] (heat-config) [WARNING] Skipping group os-apply-config with no hook script /var/lib/heat-config/hooks/os-apply-config Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: [2016-03-23 03:12:28,361] (heat-config) [WARNING] Skipping group os-apply-config with no hook script /var/lib/heat-config/hooks/os-apply-config Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: [2016-03-23 03:12:28,361] (heat-config) [WARNING] Skipping group os-apply-config with no hook script /var/lib/heat-config/hooks/os-apply-config Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: [2016-03-23 03:12:28,361] (heat-config) [WARNING] Skipping config c877cf05-f457-4621-b49b-0ec3445036e4, already deployed Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: [2016-03-23 03:12:28,361] (heat-config) [WARNING] To force-deploy, rm /var/lib/heat-config/deployed/c877cf05-f457-4621-b49b-0ec3445036e4.json Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: [2016-03-23 03:12:28,361] (heat-config) [WARNING] Skipping group os-apply-config with no hook script /var/lib/heat-config/hooks/os-apply-config Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: [2016-03-23 03:12:28,362] (heat-config) [WARNING] Skipping group Heat::Ungrouped with no hook script /var/lib/heat-config/hooks/HeatUngrouped Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: [2016-03-23 03:12:28,362] (heat-config) [WARNING] Skipping config 8b9c1b93-1ed2-4a65-863e-82aaa5875cb9, already deployed Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: [2016-03-23 03:12:28,362] (heat-config) [WARNING] To force-deploy, rm /var/lib/heat-config/deployed/8b9c1b93-1ed2-4a65-863e-82aaa5875cb9.json Mar 23 03:12:28 controller2.example.com os-collect-config[10463]: [2016-03-23 03:12:28,363] (heat-config) [DEBUG] Running /var/lib/heat-config/hooks/puppet < /var/lib/heat-config/deployed/bca15f63-6925-44bc-81d2-6dc4caa467bf.json Mar 23 03:12:29 controller2.example.com os-collect-config[10463]: [2016-03-23 03:12:29,260] (heat-config) [INFO] {"deploy_stdout": "", "deploy_stderr": "\u001b[1;31mError: Could not run: Could not retrieve facts for controller2.example.com: no address for controller2.example.com\u001b[0m\n", "deploy_status_code": 1} Mar 23 03:12:29 controller2.example.com os-collect-config[10463]: [2016-03-23 03:12:29,261] (heat-config) [DEBUG] hostname: Name or service not known Mar 23 03:12:29 controller2.example.com os-collect-config[10463]: [2016-03-23 03:12:28,389] (heat-config) [WARNING] Failed to retrieve 'hostname -f' output Mar 23 03:12:29 controller2.example.com os-collect-config[10463]: [2016-03-23 03:12:28,390] (heat-config) [DEBUG] Running FACTER_heat_outputs_path="/var/run/heat-config/heat-config-puppet/bca15f63-6925-44bc-81d2-6dc4caa467bf" FACTER_deploy_config_name="overcloud-ControllerNodesPostDeployment-yjrlqkm66mut-ControllerPuppetConfig-5snl2jksinju-ControllerPuppetConfigImpl-f3ke2url3atg" puppet apply --detailed-exitcodes /var/lib/heat-config/heat-config-puppet/bca15f63-6925-44bc-81d2-6dc4caa467bf.pp Mar 23 03:12:29 controller2.example.com os-collect-config[10463]: [2016-03-23 03:12:29,257] (heat-config) [INFO] Return code 1 Mar 23 03:12:29 controller2.example.com os-collect-config[10463]: [2016-03-23 03:12:29,257] (heat-config) [INFO] Error: Could not run: Could not retrieve facts for controller2.example.com: no address for controller2.example.com Mar 23 03:12:29 controller2.example.com os-collect-config[10463]: [2016-03-23 03:12:29,258] (heat-config) [ERROR] Error running /var/lib/heat-config/heat-config-puppet/bca15f63-6925-44bc-81d2-6dc4caa467bf.pp. [1] Mar 23 03:12:29 controller2.example.com os-collect-config[10463]: [2016-03-23 03:12:29,261] (heat-config) [INFO] Completed /var/lib/heat-config/hooks/puppet Expected results: overcloud deploy succeeds. Additional info: I found puppet/controller-puppet.yaml would have wrong template in hosts_entry. [stack@director01 tht]$ diff -u puppet/controller-puppet.yaml.orig puppet/controller-puppet.yaml --- puppet/controller-puppet.yaml.orig 2016-03-23 03:14:37.921355536 +0900 +++ puppet/controller-puppet.yaml 2016-03-23 03:14:53.692467047 +0900 @@ -1366,7 +1366,7 @@ Server's IP address and hostname in the /etc/hosts format value: str_replace: - template: IP HOST.localdomain HOST + template: IP HOST.DOMAIN HOST params: IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, ControllerHostnameResolveNetwork]}]} DOMAIN: {get_param: CloudDomain} [stack@director01 tht]$
This bug did not make the OSP 8.0 release. It is being deferred to OSP 10.
The good news is that this issue is fixed in OSP 8 GA in the Liberty code (/usr/share/openstack-tripleo-heat-templates/puppet/controller.yaml), so new installs with OSP8 will not hit this bug. The bug does still exist in the kilo version of the files (/usr/share/openstack-tripleo-heat-templates/kilo/puppet/controller-puppet.yaml) though. Not sure that it makes sense to spend any dev time fixing the kilo files in OSP 10, so I think this bug should be closed.
Closing again per the preceding comments.