Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1815605 - resolvctl does not update /etc/resolv.conf
Summary: resolvctl does not update /etc/resolv.conf
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-20 17:12 UTC by Dimitri Papadopoulos
Modified: 2020-06-05 02:29 UTC (History)
5 users (show)

Fixed In Version: systemd-245.6-2.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-05 02:29:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dimitri Papadopoulos 2020-03-20 17:12:53 UTC
Description of problem:
At least when invoked as "resolvconf", resolvctl does not update /etc/resolv.conf as expected.


Version-Release number of selected component (if applicable):
systemd-243.7-1.fc31.x86_64


How reproducible:
Always


Steps to Reproduce:
1. Start with a vanilla Fedora 31 installation

2. Create a file to feed to resolvctl, invoked as resolvconf:
$ cat > MY_FILE
namsserver 1.1.1.1
nameserver 1.0.0.1
$ 

3. Feed that file to resolvctl invoked as "resolvconf" (enp0s3 is is the network interface of my virtual machine here):
# cat MY_FILE | /usr/sbin/resolvconf -a enp0s3


Actual results:
/etc/resolv.conf is not updated.


Expected results:
/etc/resolv.conf is updated as in Ubuntu for example, it would expect it to be modified from:
# Generated by NetworkManager
nameserver 10.0.2.3
to:
# Generated by NetworkManager
nameserver 1.1.1.1
nameserver 1.0.0.1
nameserver 10.0.2.3


Additional info:
While systemd-resolved is not enabled by default on Fedora, enabling systemd-resolved doesn't help:
sudo systemctl enable --now systemd-resolved

Comment 1 Zbigniew Jędrzejewski-Szmek 2020-04-16 09:37:04 UTC
Your /etc/resolv.conf is managed by NetworkManager. And resolvconf only
talks to systemd-resolved. If you do 'resolvectl status enp0s3', do the new 
nameservers show up in there?

(I read the man page now, and it doesn't explain this very well.)

Comment 2 Dimitri Papadopoulos 2020-04-19 13:39:46 UTC
I do understand there are two independent subsystems involved in name resolution, not counting NetworkManager which operates on top:
* glibc+NSS
* systemd-resolved

It just seemed "obvious" to me that the tools used to modify the settings of either subsystem would be interoperable and would modify both subsystems. That seemed all the more "obvious" for the "resolveconf" alias of "resolvectl". I understand now this is not obvious at all and the that these two subsystems remain rather independent. And yes, systemd-resolved is updated by resolvconf and this shows when running 'resolvectl status enp0s3' later on.

It would be great if the documentation could be improved. On the other hand I have discovered that in the long term (Fedora 33) glibc will switch from NSS to systemd-resolved by default, so the two subsystems would be "merged" (by default):
https://fedoraproject.org/wiki/Changes/systemd-resolved
Perhaps it's not worth spending too much energy temporarily fixing docs that will need to be modified in less than 12 months from now anyway.

Comment 3 Zbigniew Jędrzejewski-Szmek 2020-04-20 14:41:03 UTC
https://github.com/systemd/systemd/commit/924ccc35f9

Comment 4 Fedora Update System 2020-05-31 10:54:07 UTC
FEDORA-2020-dd43dd05b1 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-dd43dd05b1

Comment 5 Fedora Update System 2020-06-01 03:12:30 UTC
FEDORA-2020-dd43dd05b1 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-dd43dd05b1`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-dd43dd05b1

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

Comment 6 Fedora Update System 2020-06-02 10:10:26 UTC
FEDORA-2020-dd43dd05b1 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-dd43dd05b1

Comment 7 Fedora Update System 2020-06-03 03:11:27 UTC
FEDORA-2020-dd43dd05b1 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-dd43dd05b1`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-dd43dd05b1

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

Comment 8 Fedora Update System 2020-06-05 02:29:26 UTC
FEDORA-2020-dd43dd05b1 has been pushed to the Fedora 32 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.