Skip to content
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

nixos/containers: don't create veths if not configured #49392

Merged
merged 1 commit into from Dec 3, 2018

Conversation

uvNikita
Copy link
Contributor

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-$INSTANCE and eth0). It's not critical, but it would be nice to get rid of them.

Things done

I tried to run tests from nixos/tests/containers using $ 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.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

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.
@uvNikita
Copy link
Contributor Author

uvNikita commented Nov 1, 2018

@Mic92 can you please look at this one when you will have time? Is there something more I should test/change?

@uvNikita
Copy link
Contributor Author

uvNikita commented Dec 3, 2018

@arianvp Maybe you have time to look at these changes? :)

@Mic92 Mic92 merged commit 958d8e6 into NixOS:master Dec 3, 2018
@uvNikita uvNikita deleted the nixos/containers/veths branch December 4, 2018 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants