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
search myhost.example.com etc.example.com example.com nameserver 10.20.30.40
Contents of resolv.conf at %post:
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
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):
anaconda-14.17-1 is not available for RHEL6 because it's a Fedora build. All RHEL6 anaconda versions will start with 13.21.
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.
Created attachment 485852 [details]
Created attachment 485853 [details]
from anaconda tmp environment
(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.
(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:
To use it, add updates=http://rvykydal.fedorapeople.org/updates.687953.img to boot options or
in kickstart file.
(see http://fedoraproject.org/wiki/Anaconda/Updates for more info)
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.
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.
(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.
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>
This should be fixed in anaconda-13.21.107-1.
Reproduced on RHEL6.0 GA x86_64 Server.
Verified on RHEL6.1-20110330.2 x86_64 Server.
*** Bug 702726 has been marked as a duplicate of this bug. ***
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.
Removing external tracker bug with the id 'DOC-48007' as it is not valid for this tracker