Bug 1210685

Summary: Could not retrieve facts for localhost.localhost: no address for localhost.localhost (corrupted /etc/resolv.conf)
Product: [Community] RDO Reporter: Jaromir Coufal <jcoufal>
Component: instack-undercloudAssignee: James Slagle <jslagle>
Status: CLOSED EOL QA Contact: Shai Revivo <srevivo>
Severity: high Docs Contact:
Priority: unspecified    
Version: trunk   
Target Milestone: ---   
Target Release: Kilo   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-19 15:52:41 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 Jaromir Coufal 2015-04-10 11:18:31 UTC
Description of problem:
When running instack-install-undercloud, puppet gets stuck with following error:

[2015/04/10 09:30:51 AM] [WARNING] DEPRECATED: falling back to /var/run/os-collect-config/os_config_files.json
dib-run-parts Fri Apr 10 09:30:51 UTC 2015 40-hiera-datafiles completed
dib-run-parts Fri Apr 10 09:30:51 UTC 2015 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 localhost.localhost: no address for localhost.localhost


Steps to Reproduce:
1. Provision beaker machine
2. instack-virt-setup (with CentOS distribution)
3. Follow instack docs up to instac-install-undercloud


Additional info:
cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6


'facter fgdn' returns 'localhost.localhost'
'hostname -f' returns 'localhost'

they should be same.


Workaround:
1) $ sudo vi /etc/resolv.conf
2) comment/delete 'domain' and 'search' lines
3) re-run instack-install-undercloud


Actual results:
instack-install-undercloud fails for not being able to retrieve facts from the host.

Expected results:
instack-install undercloud passes without any issues

Comment 1 James Slagle 2015-04-10 11:38:01 UTC
i think this is a puppet problem, it can be very particular about the hostname. can you try setting a full fqdn hostname?

sudo hostnamcectl set-hostname <host>.<domain>

then try instack-install-undercloud again.

Comment 2 Jaromir Coufal 2015-04-11 14:59:32 UTC
Hey James, I tried your suggestion:

sudo hostnamectl set-hostname localhost.localdomain

but still the same issue, only my provided workaround helps so far. Still talking about CentOS VMs, not sure if this applies also on RHEL.

Comment 3 Jaromir Coufal 2015-04-21 05:55:26 UTC
Still re-appearing in 100% of cases.

Comment 6 Chandan Kumar 2016-05-19 15:52:41 UTC
This bug is against a Version which has reached End of Life.
If it's still present in supported release (http://releases.openstack.org), please update Version and reopen.