Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1354453 - Reslolution issue due to "openshift_set_hostname=true" in inventory hosts and static ip configrued in hosts
Summary: Reslolution issue due to "openshift_set_hostname=true" in inventory hosts an...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.2.1
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Scott Dodson
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-11 11:20 UTC by Gan Huang
Modified: 2017-08-24 20:49 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-24 20:49:51 UTC


Attachments (Terms of Use)

Description Gan Huang 2016-07-11 11:20:53 UTC
Description of problem:
If the vms are configured with static ip address, and "openshift_set_hostname=true" was set in inventory hosts, /etc/resolv.conf would be reset in Task "Set hostname" (that is the shell command "hostnamectl set-hostname"), then lead to the installation failed because of no nameservers in /etc/reslove.conf,

Version-Release number of selected component (if applicable):
openshift-ansible-3.2.10-1.git.0.e128827.el7

How reproducible:
Always

Steps to Reproduce:
1.set "openshift_set_hostname=true" in inventory hosts
2.Config the static ip and dns in vms before installation.
#cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO=static
ONBOOT="yes"
TYPE="Ethernet"
NM_CONTROLLED=no
GATEWAY=192.168.2.1
NETMASK=255.255.255.0
IPADDR=192.168.2.238
PEERDNS=yes
DNS2=10.73.x.x
DNS1=10.73.x.x

3.Check dns 
# cat /etc/resolv.conf
# Generated by NetworkManager
search lab.eng.nay.redhat.com


# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com
nameserver 10.73.3.x
nameserver 10.73.3.x

4.Running BYO playbook

Actual results:
TASK: [openshift_master | Install Master package] ***************************** 
failed: [xxx.redhat.com] => {"changed": true, "rc": 1, "results": ["Loaded plugins: product-id, search-disabled-repos, subscription-manager\nThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.\nResolving Dependencies\n--> Running transaction check\n---> Package atomic-openshift-master.x86_64 0:3.2.1.3-1.git.0.dfa4ad6.el7 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package                   Arch     Version                         Repository\n                                                                           Size\n================================================================================\nInstalling:\n atomic-openshift-master   x86_64   3.2.1.3-1.git.0.dfa4ad6.el7     aos   214 k\n\nTransaction Summary\n================================================================================\nInstall  1 Package\n\nTotal download size: 214 k\nInstalled size: 912  \nDownloading packages:\n"]}
msg: http://xxx.nay.redhat.com/rcm-guest/puddles/RHAOS/AtomicOpenShift-errata/3.2/2016-06-27.2/RH7-RHAOS-3.2/x86_64/os/Packages/atomic-openshift-master-3.2.1.3-1.git.0.dfa4ad6.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: xxx.nay.redhat.com; Unknown error"
Trying other mirror.

Check /etc/resolv.conf and /etc/dnsmasq.d/origin-dns-upstream.conf on Master
# cat /etc/resolv.conf
# Generated by NetworkManager
search xxx.redhat.com


# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com

# cat /etc/dnsmasq.d/origin-dns-upstream.conf
cat: /etc/dnsmasq.d/origin-dns-upstream.conf: No such file or directory

Expected results:
the hosts can be resloved and installation successed

Additional info:


Note You need to log in before you can comment on or make changes to this bug.