Skip to content

Comments

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

Merged
Mic92 merged 1 commit intoNixOS:masterfrom
uvNikita:nixos/containers/veths
Dec 3, 2018
Merged

nixos/containers: don't create veths if not configured#49392
Mic92 merged 1 commit intoNixOS:masterfrom
uvNikita:nixos/containers/veths

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 uvNikita force-pushed the nixos/containers/veths branch from 3220645 to 6d4b02d Compare October 29, 2018 13:03
@GrahamcOfBorg GrahamcOfBorg added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Oct 29, 2018
@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

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants