Re: NM re-writing /etc/resolv.conf



On Fri, 2012-03-02 at 12:03 +0000, Timothy Murphy wrote:
> Dan Williams wrote:
> 
> > On Thu, 2012-03-01 at 12:46 +0000, Timothy Murphy wrote:
> >> This morning, when I brought my hibernating Fedora-16 laptop to life,
> >> I found NM had re-written /etc/resolv.conf , leaving only comments.
> >> 
> >> The laptop was connected to the internet before hibernation,
> >> and had been working normally.
> >> 
> >> Why does NM do this?
> >> Is there any way of stopping it?
> > 
> > If NM fails to find connectivity, then any nameservers
> > in /etc/resolv.conf are no longer valid since they cannot be reached.
> > If you have static nameservers that you'd like to use, those should be
> > specified *per-connection*, since as David said, nameservers change
> > depending on where the information came from (VPN, DHCP, PPP, etc).
> > 
> > Can you describe your problem in more detail?
> 
> The problem (I wouldn't call it a problem, more a nuisance)
> is that when I hibernate, and then wake up my laptop,
> I find that NM has deleted all the entries in /etc/resolv.conf
> except for the comment lines.
> 
> Everything else seems to be working fine.
> The laptop is connected to my LAN, and so to the internet.
> I can browse to any site if I give the IP address.
> It is just DNS that is not working.

When you get in this state, can you run 'nmcli dev' for me?

Dan

> My solution is to keep a copy of /etc/resolv.conf (in /common/tim/laptop/)
> and just copy it back to /etc .
> This takes a second.
> 
> As to the cause of the problem, I see
> -----------------------------------
> Mar  2 11:04:27 blanche NetworkManager[818]: get_secret_flags: assertion 
> `is_secret_prop (setting, secret_name, error)' failed
> Mar  2 11:04:27 blanche NetworkManager[818]: NetworkManager[818]: 
> get_secret_flags: assertion `is_secret_prop (setting, secret_name, error)' 
> failed
> -----------------------------------
> in /var/log/messages .
> I assume this has something to do with it.
> 
> But my main point is that I cannot think of any circumstances
> in which this action by NM could be of any help.
> I can conceive that there might be situations
> where it makes sense to replace the nameservers by others,
> but I cannot think of any where it makes sense simply to delete them.
> 
> I'm not sure if this is relevant,
> but I'm running dhcpd on my CentOS-6.2 server,
> and this has the nameservers listed in /etc/dhcp/dhcpd.conf .
> 
> 
> 
> 
> 
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]