Bug 1304779

Summary: Undercloud hostname seems to be hardcoded
Product: Red Hat OpenStack Reporter: Alexandre Maumené <amaumene>
Component: instack-undercloudAssignee: James Slagle <jslagle>
Status: CLOSED CURRENTRELEASE QA Contact: Shai Revivo <srevivo>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.0 (Liberty)CC: dbecker, dsneddon, jcoufal, mburns, morazi, rhel-osp-director-maint
Target Milestone: ---   
Target Release: 10.0 (Newton)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-14 18:58:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexandre Maumené 2016-02-04 15:17:01 UTC
Description of problem:
When running openstack undercloud install it fails with:
dib-run-parts Thu Feb 4 09:53:15 EST 2016 20-os-net-config completed
dib-run-parts Thu Feb 4 09:53:15 EST 2016 Running /usr/libexec/os-refresh-config/configure.d/40-hiera-datafiles
[2016/02/04 09:53:15 AM] [WARNING] DEPRECATED: falling back to /var/run/os-collect-config/os_config_files.json
dib-run-parts Thu Feb 4 09:53:15 EST 2016 40-hiera-datafiles completed
dib-run-parts Thu Feb 4 09:53:15 EST 2016 Running /usr/libexec/os-refresh-config/configure.d/50-puppet-stack-config
+ set -o pipefail
+ set +e
+ puppet apply --detailed-exitcodes /etc/puppet/manifests/puppet-stack-config.pp
Error: Could not run: Could not retrieve facts for undercloud.redhat.com: no address for undercloud.redhat.com

Version-Release number of selected component (if applicable):
python-openstackclient.noarch 1.7.2-1.el7ost
python-tripleoclient.noarch   0.0.11-5.el7ost
instack-undercloud.noarch     2.2.0-1.el7ost

How reproducible:
Every time.

Steps to Reproduce:
1. Deploy undersold with last OSP-d 8 puddle
2. Run openstack undercloud install
3.

Actual results:
Error: Could not run: Could not retrieve facts for undercloud.redhat.com: no address for undercloud.redhat.com
+ rc=1
+ set -e
+ echo 'puppet apply exited with exit code 1'
puppet apply exited with exit code 1
+ '[' 1 '!=' 2 -a 1 '!=' 0 ']'
+ exit 1
[2016-02-04 09:53:17,557] (os-refresh-config) [ERROR] during configure phase. [Command '['dib-run-parts', '/usr/libexec/os-refresh-config/configure.d']' returned non-zero exit status 1]

[2016-02-04 09:53:17,557] (os-refresh-config) [ERROR] Aborting...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 562, in install
    _run_orc(instack_env)
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 494, in _run_orc
    _run_live_command(args, instack_env, 'os-refresh-config')
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 325, in _run_live_command
    raise RuntimeError('%s failed. See log for details.' % name)
RuntimeError: os-refresh-config failed. See log for details.
Command 'instack-install-undercloud' returned non-zero exit status 1

Expected results:
Should work with any hostname.

Additional info:
Can be fixed with:
[stack@undercloud ~]$ sudo hostnamectl set-hostname undercloud.redhat.com
[stack@undercloud ~]$ sudo hostnamectl set-hostname --transient undercloud.redhat.com
And adapt /etc/hosts

Comment 2 Mike Burns 2016-04-07 21:07:13 UTC
This bug did not make the OSP 8.0 release.  It is being deferred to OSP 10.

Comment 4 Dan Sneddon 2016-10-14 18:58:55 UTC
The undercloud now works with any hostname which is set correctly in /etc/hosts. Closing this bug for now.

If you find that this functionality still doesn't work as expected, please reopen this bug.