Bug 2076045 - dnf upgrades sometimes replace the file /etc/resolv.conf back to the original symbolic link
Summary: dnf upgrades sometimes replace the file /etc/resolv.conf back to the original...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 35
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-17 11:21 UTC by Ray Holme
Modified: 2022-05-22 01:23 UTC (History)
20 users (show)

Fixed In Version: systemd-249.12-3.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-22 01:23:12 UTC
Type: Bug


Attachments (Terms of Use)

Description Ray Holme 2022-04-17 11:21:28 UTC
Description of problem: Twice (out of many years updating every week) the upgrade has replaced my real file /etc/resolv.conf with the original symbolic link. This is a disaster to browser access of the net.


Version-Release number of selected component (if applicable): n.a.


How reproducible: When it happens 100%.


Steps to Reproduce:
1. dnf upgrade
2.
3.

Actual results: When it happens, network access to any named web site is stopped with "server not found".


Expected results: When a user has replaced the symbolic link (as instructed to in the symbolic link file pointing to /run/systemd/resolve/resolv.conf), /etc/resolv.conf should not be changed during an upgrade - certainly NOT relinked to the original link.


Additional info: Perhaps the fault is NOT with dnf itself, but with the instructions given it by the upgrade request. I do not know how to direct this bug to the attention of the group doing that.

Comment 1 Marek Blaha 2022-04-19 09:23:04 UTC
As you mentioned, dnf is definitely not changing the symlink. It has to be done by some rpm package that was part of the upgrade.
I guess the culprit is systemd-resolved which creates the symlink in its scriptlets, so I re-assign it there for further investigation.

Comment 2 Zbigniew Jędrzejewski-Szmek 2022-04-22 17:49:26 UTC
Yeah, the rpm scriptlet had a check for whether we're doing an upgrade or initial installation, but that check was borked.

Comment 3 Ray Holme 2022-04-23 11:01:49 UTC
OK, please don't bork it again. :=]]]

Sorry, but I just plain forgot about it and spent 2 hours thinking it was hardware. My boof!

Comment 4 Fedora Update System 2022-04-28 20:41:51 UTC
FEDORA-2022-01079468a3 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-01079468a3

Comment 5 Fedora Update System 2022-04-29 08:09:14 UTC
FEDORA-2022-01079468a3 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-01079468a3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-01079468a3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Ray Holme 2022-04-29 10:58:46 UTC
Thanks to all of you. Nice.

Comment 7 Fedora Update System 2022-04-30 18:22:10 UTC
FEDORA-2022-01079468a3 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-01079468a3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-01079468a3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Ray Holme 2022-05-07 11:47:02 UTC
5/7/2022 and I just did a system upgrade.
I had a real file in /etc/resolv.conf (I copy in mine and do not use a symlink anymore) AND I have a file called /etc/NetworkManager/conf.d/no-dns.conf contining these 2 lines

[main]
dns=none

ALL TO NO AVAIL. The upgrade replaced my real file with the symlink to the generated file.

BOO HOO HOO.

At least I remembered this time, so the fix only took a minute.

Comment 9 Fedora Update System 2022-05-22 01:23:12 UTC
FEDORA-2022-01079468a3 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.