New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty networking.nameservers wipes /etc/resolv.conf after a rebuild #61490
Comments
I also have this problem. It seems to be because NetworkManager's default setting for rc-manager has changed from "resolvconf" to "symlink" - at least the behavior indicates this, even if the documentation states that "symlink" is and was the default setting. I've fixed it in my config by setting
|
Ah, interesting. That would probably solve this as well... |
Add an option to set the rc-manager parameter in NetworkManager.conf, which controls how NetworkManager handles resolv.conf. This sets the default rc-manager to "resolvconf", which solves NixOS#61490. It additionally allows the user to change rc-manager without interference from configuration activations.
Ping. |
Add an option to set the rc-manager parameter in NetworkManager.conf, which controls how NetworkManager handles resolv.conf. This sets the default rc-manager to "resolvconf", which solves #61490. It additionally allows the user to change rc-manager without interference from configuration activations.
I believe this is fixed now by 80acb28. Can reopen if not. |
I think I just had this re-occur, but I don't understand the technical details. Could someone confirm? I'm on 4517967 |
Issue description
nixos-rebuild --switch
wipes nameservers in/etc/resolv.conf
when nonetworking.nameservers
is set.This began to happen a week or two ago, I think...
Someone else seems to be experiencing this: https://www.reddit.com/r/NixOS/comments/bohkz2/nixosrebuild_switch_causes_my_internet_to_die/
May be related to #61230.
Steps to reproduce
configuration.nix
:After a fresh boot, the
/etc/resov.conf
is generated by NetworkManager (probably generated by resolvconf then overwritten by NetworkManager):After a
nixos-rebuild --switch
:No resolvers available 😞
Quick fix: disconnect/reconnect to the network or manually edit the file.
Why would resolvconf rewrite this is no nameservers are defined?
If I define some:
At boot, my
resolv.conf
is still generated by NetworkManager. After a rebuild, it's overwritten bynetworking.nameservers
:With
networking.networkmanager.dns = "none"
, we can tell NetworkManager to not updateresolv.conf
. Would it be possible to have an option for the other way around?In the doc for
networking.nameservers
:If it's empty it's supposed to not update
/etc/resolv.conf
then, right?I'm a bit confused, so please tell me if I missed something 🙂
Technical details
"x86_64-linux"
Linux 5.0.14, NixOS, 19.09pre179307.bc94dcf5002 (Loris)
yes
yes
nix-env (Nix) 2.2.2
"nixos-19.09pre179307.bc94dcf5002, home-manager, nixos-hardware"
""
/nix/var/nix/profiles/per-user/root/channels/nixos
The text was updated successfully, but these errors were encountered: