Red Hat Bugzilla – Bug 1303095
NetworkManager restart removes nameservers from resolv.conf
Last modified: 2016-12-20 13:17:44 EST
Description of problem:
When I configure NetworkManager to NOT update resolv.conf and then reset it's configuration to initial and restart it, it removes all configured nameservers in resolv.conf.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. create a file named 20-unmanaged-resolv.conf in /etc/NetworkManager/conf.d/ folder with the following contents:
2. restart NetworkManager
3. make sure /etc/resolv.conf contains at least one nameserver directive
4. remove /etc/NetworkManager/conf.d/20-unmanaged-resolv.conf file
5. restart NetworkManager
6. Inspect /etc/resolv.conf
all lines starting with 'nameserver' get deleted
File should remain unchanged
Tried it on f22 with NetworkManager-1.0.2-1.fc22.x86_64 - works as expected.
(In reply to Oleg Fayans from comment #0)
> Description of problem:
> When I configure NetworkManager to NOT update resolv.conf and then reset
> it's configuration to initial and restart it, it removes all configured
> nameservers in resolv.conf.
At first sight this looks correct; when NM restarts the dns=none is not present and therefore NM actively manages resolv.conf. Probably there aren't any active connections and therefore the file gets cleared.
Can you please describe why do you think that NM should not touch resolv.conf after the restart?
And also, can't you simply leave dns=none if you care about resolv.conf not being overwritten?
> At first sight this looks correct; when NM restarts the dns=none is not present > and therefore NM actively manages resolv.conf. Probably there aren't any active > connections and therefore the file gets cleared.
The thing occurs in virtual machines running in rhevm lab. It is highly unlikely that at any given period of time they have no network connection.
I do not think, NM should not touch resolv.conf after restart, I am just sure it should put SOME nameservers there.
This whole workflow disabling NM interaction with the resolver was a part of an automated test. Naturally, all changes to the target system are reverted at the test teardown. It's the next test, failing due to empty resolv.conf, that actually made us consider NM's behavior inappropriate.
(In reply to Oleg Fayans from comment #2)
> I do not think, NM should not touch resolv.conf after restart, I am just
> sure it should put SOME nameservers there.
You are right, NM should put some servers in resolv.conf, as long as
there are active connections providing those name servers. Can you please
show the output of 'nmcli c; nmcli d' before and after the restart
(when resolv.conf is empty)? Thanks!
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 23 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.