once you update the file to be a good one, then do this:

chattr +i /etc/resolv.conf  (that sets the immutable bit that disallows rename, write, delete).

That should prevent anything from overwriting the file.  If you need to change the file you will have to -i the file first.

It is kind of crude but useful in cases where you really don't want a file to get changed.



On Tue, May 31, 2022 at 7:26 AM Eyal Lebedinsky <fedora@eyal.emu.id.au> wrote:
I am on f36 for a few weeks now, upgraded from f34.

This is the second time this happened. A 'dnf update' runs fine but hangs at the very end, after the list of 'Veritying'.
dnf (the python3 process) is in state D+ (though I could kill it).

dnf.log ends with
        2022-05-31T21:32:33+1000 DDEBUG RPM transaction start.
        2022-05-31T21:37:51+1000 DDEBUG RPM transaction over.

It is missing the usual final stanza, like
        2022-05-16T22:21:23+1000 DDEBUG RPM transaction over.
        2022-05-16T22:21:23+1000 DDEBUG timer: verify transaction: 672 ms
        2022-05-16T22:21:23+1000 DDEBUG timer: transaction: 2669 ms

dnf.rpm.log ends with this interesting line
        2022-05-31T21:37:06+1000 INFO '/etc/resolv.conf' -> '../run/systemd/resolve/stub-resolv.conf'
and sure enough I lost connectivity which may have lead to dnf hanging.
Rebooting leave my network setup broken in the same way.
Restoring resolv.conf to my usual hand made file gets things going.

This seems to happen when a kernel is updated but not at other times.

While I can "fix" it (I keep a resolv.conf.good) when it happens, I would rather sort it out permanently if it is a local issue.

Any idea?

--
Eyal Lebedinsky (fedora@eyal.emu.id.au)
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure