With the new version of the post_install_network_snippet (1.6.2) and a dhcp host, I am getting some odd behavior. The snippet writes over the current /etc/resolv.conf (that was generated by dhclient-script) but doesn't rerun dhclient to regenerate it. This causes anything following it in the post script to fail name resolution.
Micahel suggested on irc the possibility of just running this snippet last, I am fine with this if that is the general consensus but I thought maybe this behavior was unintended.
/etc/resolv.conf before snippet: ; generated by /sbin/dhclient-script search cic.pdx.edu nameserver 131.252.120.128 nameserver 131.252.120.129
/etc/resolv.conf after snippet: ; generated by /sbin/dhclient-script search
This host is in a profile that doesn't have 'name servers' or 'name servers search' defined since all hosts using it use dhcp. I will add some settings and reload to test if that fixes things.
On Apr 3, 2009, at 3:54 PM, matt whiteley wrote:
This host is in a profile that doesn't have 'name servers' or 'name servers search' defined since all hosts using it use dhcp. I will add some settings and reload to test if that fixes things.
Yes, that did indeed fix things. The host uses the dhcp supplied info until the snippet runs and then uses the profile info. Upon boot dhclient again writes out the /etc/resolv.conf. If this is the desired behavior maybe the description 'Name servers, space delimited, if not provided by DHCP' should change to suggest they are always included for possible use during kickstarts?
On 04/04/2009 01:51 AM, matt whiteley wrote:
On Apr 3, 2009, at 3:54 PM, matt whiteley wrote:
This host is in a profile that doesn't have 'name servers' or 'name servers search' defined since all hosts using it use dhcp. I will add some settings and reload to test if that fixes things.
Yes, that did indeed fix things. The host uses the dhcp supplied info until the snippet runs and then uses the profile info. Upon boot dhclient again writes out the /etc/resolv.conf. If this is the desired behavior maybe the description 'Name servers, space delimited, if not provided by DHCP' should change to suggest they are always included for possible use during kickstarts?
I think this is a bug, the code should be changed so that it doesn't touch resolv.conf if nameservers and NS-search are empty. Could you file a trac item on this?
Jasper
cobbler@lists.fedorahosted.org