nixos/containers: don't create veths if not configured#49392
Merged
Mic92 merged 1 commit intoNixOS:masterfrom Dec 3, 2018
Merged
nixos/containers: don't create veths if not configured#49392Mic92 merged 1 commit intoNixOS:masterfrom
Mic92 merged 1 commit intoNixOS:masterfrom
Conversation
Previously, setting "privateNetwork = true" without specifying host and local addresses would create unconfigured interfaces: ve-$INSTANCE on the host and eth0 inside the container. These changes is rebased part of the original PR NixOS#3021.
3220645 to
6d4b02d
Compare
Contributor
Author
|
@Mic92 can you please look at this one when you will have time? Is there something more I should test/change? |
Contributor
Author
|
@arianvp Maybe you have time to look at these changes? :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, setting "privateNetwork = true" without specifying host and
local addresses would create unconfigured interfaces: ve-$INSTANCE on the host
and eth0 inside the container.
These changes is rebased part of the original PR #3021.
Motivation for this change
I have quite a few containers running on my home server and most of them use macvlans to connect to my local network. As a result, I'm left with a bunch of useless interfaces both on the host and inside containers (
ve-$INSTANCEandeth0). It's not critical, but it would be nice to get rid of them.Things done
I tried to run tests from
nixos/tests/containersusing$ nix-build nixos/tests/container-<test>and looking at result/log.html. Some tests failed, but they also fail for me on the current master, so I'm not sure how to check if proposed changes break anything.sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)nix path-info -Sbefore and after)