Bug 687953

Summary: RHEL 6 - /etc/resolv.conf gets corrupted, cannot download packages
Product: Red Hat Enterprise Linux 6 Reporter: cphillip
Component: anacondaAssignee: Radek Vykydal <rvykydal>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.0CC: aparsons, atodorov, borgan, cphillip, ddumas, jwest, mmello, pholica, pmutha, psingare, tru
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: anaconda-13.21.107-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 12:39:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
anaconda logs
none
from anaconda tmp environment none

Description cphillip 2011-03-15 20:01:44 UTC
Description of problem:

When doing PXE/kickstart installs of RHEL6 from satellite, /etc/resolv.conf gets corrupted.  

NetworkManager is correctly writing resolv.conf with DNS information obtained from DHCP, however, this is being overwritten by another process which breaks name resolution in the %post scripts; this means that the RHEL6 hosts are not registering to Satellite.

Contents of resolv.conf at %pre:
# Generated by NetworkManager
domain myhost.example.com
search myhost.example.com etc.example.com example.com nameserver 10.20.30.40


Contents of resolv.conf at %post:
search myhost.example.com


The change to resolv.conf happens as Anaconda switches to the "Starting installation process" screen.  It does not appear to be NetworkManager changing resolv.conf because the file does not have the "#Generated by NetworkManager" header

This looks to be the same issue as seen in BZ 622927
https://bugzilla.redhat.com/show_bug.cgi?id=622927

Status: CLOSED ERRATA 
Fixed In Version: anaconda-14.17-1


anaconda-14.17-1 is not available for RHEL from supported repos




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

How reproducible:
Every Time

Comment 1 Chris Lumens 2011-03-15 20:07:55 UTC
anaconda-14.17-1 is not available for RHEL6 because it's a Fedora build.  All RHEL6 anaconda versions will start with 13.21.

Comment 3 cphillip 2011-03-16 21:41:50 UTC
We are installing via Satellite, meaning the version of Anaconda is the same as the 6.0 installation media. You can only use the version of anaconda that is provided as part of the boot image, which is provided as part of the installation tree downloaded by rhn-satellite-sync from Red Hat.  There is no way to update this without Red Hat updating and releasing an updated version.  We can't update the version of Anaconda in the SquashFS install.img file. And even then, the fix for this hasn't been backported to RHEL6.

At this time we are currently unable to properly build RHEL6 VMs because of this issue.

Comment 4 cphillip 2011-03-16 21:43:25 UTC
Created attachment 485852 [details]
anaconda logs

Comment 5 cphillip 2011-03-16 21:45:08 UTC
Created attachment 485853 [details]
from anaconda tmp environment

Comment 7 Radek Vykydal 2011-03-21 14:56:21 UTC
(In reply to comment #6)
> Radek, is this https://bugzilla.redhat.com/show_bug.cgi?id=622927  ?

Most probably it is, I can prepare updates image to confirm.

Comment 8 Radek Vykydal 2011-03-21 16:03:00 UTC
(In reply to comment #7)

> Most probably it is, I can prepare updates image to confirm.

This updates image (for anaconda 13.21.82 / rhel 6.0) contains the patch and should fix the issue:
http://rvykydal.fedorapeople.org/updates.687953.img

To use it, add updates=http://rvykydal.fedorapeople.org/updates.687953.img to boot options or 
updates=http://rvykydal.fedorapeople.org/updates.687953.img
in kickstart file.
(see http://fedoraproject.org/wiki/Anaconda/Updates for more info)

Comment 9 RHEL Product and Program Management 2011-03-21 20:50:00 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.

Comment 10 Radek Vykydal 2011-03-22 14:14:22 UTC
One of the cases in which /etc/resolv.conf can be overwritten by anaconda is when bare hostname (without dots) that can be resolved to a fqdn (we use socket.getfqdn() call) is set (--hostname=rhel6-broken-1 in this case?).

Anaconda is racing with NetworkManager to update the /etc/resolv.conf, so the bug might not be easily reproducible in different environment.

I tested locally that the patch from Fedora that keeps anaconda's hands off /etc/resolv.conf should resolve the issue.

Comment 12 Aron Parsons 2011-03-22 14:30:17 UTC
(In reply to comment #10)
> One of the cases in which /etc/resolv.conf can be overwritten by anaconda is
> when bare hostname (without dots) that can be resolved to a fqdn (we use
> socket.getfqdn() call) is set (--hostname=rhel6-broken-1 in this case?).

Yes, --hostname is set to the short hostname.  resolv.conf has the search domains set via DHCP, so it's able to resolve our short name into a FQDN.  This would explain why I was having trouble reproducing it in another environment.

Comment 14 Radek Vykydal 2011-03-22 15:34:53 UTC
For QA:

I am able to reproduce with kickstart installation containing this network command:

network --device=eth0 --bootproto=dhcp --hostname=<short version of hostname obtained by dhcp>

Comment 16 Radek Vykydal 2011-03-23 10:10:07 UTC
This should be fixed in anaconda-13.21.107-1.

Comment 18 Pavel Holica 2011-04-04 14:12:53 UTC
Reproduced on RHEL6.0 GA x86_64 Server.
Verified on RHEL6.1-20110330.2 x86_64 Server.

Comment 22 Alexander Todorov 2011-05-10 17:42:31 UTC
*** Bug 702726 has been marked as a duplicate of this bug. ***

Comment 23 errata-xmlrpc 2011-05-19 12:39:07 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0530.html

Comment 24 Red Hat Bugzilla 2013-10-04 00:24:32 UTC
Removing external tracker bug with the id 'DOC-48007' as it is not valid for this tracker