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
containers: deny networkmanager from managing the ve-* and vb-* NICs #31888
Conversation
Wouldn't this better suited for |
Using udev rules would have the advantage that nework-manager doesn't have to be restarted when you change Shouldn't |
a6ee58b
to
a7989e8
Compare
I force-pushed a change to handle this via udev rules. When this gets merged I will also cherry-pick this bugfix on |
Would it make sense to check for network manager before adding those rules? It probably doesn't matter much in this small change. |
Without this, when you've enabled networkmanager and start a nixos-container the container will briefly have its specified IP address but then networkmanager starts managing it causing the IP address to be dropped.
a7989e8
to
deac325
Compare
@andir that makes a lot of sense. I force pushed a fix. Thanks for the review. |
Any chance this can be merged? I would also like to cherry-pick this on |
Since there were no further comments, and it work fine as far as I can tell, I've rebased this to master in 5572de7. Many thanks! |
Heh, literally the second after merging I realized that the pattern @basvandijk Maybe it is fine to leave this in master for a few days until cherry-picking to stable? |
@rycee thanks for spotting my error and fixing it. I'll wait a week before cherry-picking this on stable. |
I just rebased the two commits to 17.09. Have been running 17.09 with them applied since merging to master and they work just fine 👍 |
Motivation for this change
Without this, when you've enabled networkmanager and start a nixos-container the container will briefly have its specified IP address but then networkmanager starts managing it causing the IP address to be dropped.
Things done
I've had
networking.networkmanager.unmanaged = [ "interface-name:ve-*" ];
applied to my local configuration for a while and it solves the problem.build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)