[CentOS] [External] Re: Unexpected /etc/resolv.conf updates on CentOS 7

Fri Oct 22 10:51:25 UTC 2021
Toralf Lund <toralf.lund at pgs.com>

On 14/10/2021 08:44, Simon Matter wrote:
>> On 13/10/2021 20:06, J Martin Rushton via CentOS wrote:
>>> If you just want to tell NM to clear off and leave your resolv.conf
>>> alone do the following:
>> I might possibly be able to set up a workaround based on that, but it's
>> not what I really want. Ideally I want NetworkManager to update
>> resolv.conf, but only if it actually set up a new connection and/or got
>> new information. Which is what it seemed to do in the past, but then
>> something changed...
> I'm not running CentOS 7 with NetworkManager so I could be wrong but,
> isn't it possible to run DHCP internally in NM or use dhclient? If so, did
> you really check that nothing has happened there like renewing of the
> lease?

I'm not exactly sure what you mean by running DHCP internally in NM, but 
dhclient is being used. It's started automatically with a config 
generated by NetworManager, and also a NM/connection specific lease file.

The resolv.conf update time does not match renew, rebind or expire time 
stored in the lease file, and the file itself is generally not updated 
when resolv.conf gets rewritten.


>   And did you also check on the ethernet link level that it never
> went down for a short period of time? Such things can happen in certain
> configurations.

It's hard to be sure, but I didn't find anything in the system log to 
indicate disconnect from the network.

It may also look like (based on other "scenarios") 
disconnects/reconnects are actually handled gracefully, as in the VPN 
software detects or is notified about an update, and writes its own 
resolve.conf

> Or, could it be that you have some software which interacts with
> NetworkManager via dbus and therefore the problem happens?

I'm not quite sure how I can tell.

But I think I'm onto something now: It may actually look like the 
problem is caused by IP6 address updates, which I guess are not 
controlled by dhclient or the traditional leases mechanism. Maybe I'll 
post some more details later...

- Toralf



>
> Regards,
> Simon
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.centos.org%2Fmailman%2Flistinfo%2Fcentos&data=04%7C01%7Ctoralf.lund%40pgs.com%7C48537c76ad36483bff5908d98ede1efa%7C51d05d6147e9480b93b298dc84f1ed06%7C0%7C0%7C637697906929058677%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=4Vnd3tHk8%2F1A48ZYivfw3k%2B5HrsC%2BaH6K%2FIR9xLOY28%3D&reserved=0