Bug 1370225

Summary: Missing nameserver and search entries in /etc/resolv.conf after install of RHVH-4.0-20160817.1
Product: Red Hat Enterprise Virtualization Manager Reporter: Javier Coscia <jcoscia>
Component: rhev-hypervisor-ngAssignee: Fabian Deutsch <fdeutsch>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 4.0.2CC: danken, dfediuck, gklein
Target Milestone: ovirt-4.0.4   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-30 07:56:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1304509    

Description Javier Coscia 2016-08-25 16:06:51 UTC
Description of problem:

After finish with RHVH-4.0-20160817.1 installation, the nameserver and search entries in /etc/resolv.conf file won't exist.
This would be noticed while trying to ping/resolve a FQDN and also while trying to register the RHVH through RHSM

Version-Release number of selected component (if applicable):

RHVH-4.0-20160817.1-RHVH-x86_64-dvd1.iso from download access portal

How reproducible:
100%

Steps to Reproduce:
1. Install a new RHVH with GA ISO from portal
2. During installation, configure network and define a DNS and a search domain
3. Complete the installation and reboot
4. Check for /etc/resolv.conf content and/or try ping/resolve a URL/host

Actual results:
nameserver and search definitions in /etc/resolv.conf are missing after RHVH installation

~~~
[root@rhvh40-3 ~]# cat /etc/resolv.conf 

[root@rhvh40-3 ~]# dig www.redhat.com

; <<>> DiG 9.9.4-RedHat-9.9.4-29.el7_2.3 <<>> www.redhat.com
;; global options: +cmd

;; connection timed out; no servers could be reached
[root@rhvh40-3 ~]# ping  www.redhat.com
ping: unknown host www.redhat.com

~~~

Expected results:
The entries should remain configured as defined during installation

Additional note:

Simply by adding them into /etc/resolv.conf fixes the problem

Also, initially, before adding the host into RHVM and create the ovirtmgmt bridge, the ifcfg-eth0 file has the correct information

ifcfg-eth0:
===========
DEVICE="eth0"
ONBOOT="yes"
IPADDR="192.168.122.136"
PREFIX="24"
GATEWAY="192.168.122.1"
DNS1="8.8.8.8"
DOMAIN="redhat.com"


~~~
[root@rhvh40-3 ~]# echo "nameserver 192.168.122.1" > /etc/resolv.conf 

[root@rhvh40-3 ~]# echo "search example.com" >> /etc/resolv.conf 

[root@rhvh40-3 ~]# cat /etc/resolv.conf 
nameserver 192.168.122.1
search example.com

[root@rhvh40-3 ~]# ping www.redhat.com
PING e3396.dscx.akamaiedge.net (104.119.146.170) 56(84) bytes of data.
64 bytes from a104-119-146-170.deploy.static.akamaitechnologies.com (104.119.146.170): icmp_seq=1 ttl=55 time=306 ms
64 bytes from a104-119-146-170.deploy.static.akamaitechnologies.com (104.119.146.170): icmp_seq=2 ttl=55 time=330 ms
--- e3396.dscx.akamaiedge.net ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1922ms
rtt min/avg/max/mdev = 306.657/318.429/330.202/11.786 ms


[root@rhvh40-3 ~]# dig www.redhat.com

; <<>> DiG 9.9.4-RedHat-9.9.4-29.el7_2.3 <<>> www.redhat.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15796
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;www.redhat.com.			IN	A

;; ANSWER SECTION:
www.redhat.com.		3	IN	CNAME	ds-www.redhat.com.edgekey.net.
ds-www.redhat.com.edgekey.net. 11956 IN	CNAME	ds-www.redhat.com.edgekey.net.globalredir.akadns.net.
ds-www.redhat.com.edgekey.net.globalredir.akadns.net. 1625 IN CNAME e3396.dscx.akamaiedge.net.
e3396.dscx.akamaiedge.net. 10	IN	A	104.119.146.170

;; Query time: 0 msec
;; SERVER: 192.168.122.1#53(192.168.122.1)
;; WHEN: Thu Aug 25 14:59:12 ART 2016
;; MSG SIZE  rcvd: 207
~~~

Let me know if you need me to share more information.

Regards
Javier

Comment 2 Fabian Deutsch 2016-08-25 16:22:32 UTC
This is one of several issues around networking - It's tracked in bug 1304509

Comment 4 Dan Kenigsberg 2016-08-30 07:56:56 UTC
given comment 3, I'm closing this as a dup of bug 1364126.

Proper persistence of DNS entries is expected in 4.0.4 as part of bug 1351095.

*** This bug has been marked as a duplicate of bug 1364126 ***