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/tests/networking: fix macvlan tests #93893

Merged
merged 1 commit into from Jul 26, 2020

Conversation

chvp
Copy link
Member

@chvp chvp commented Jul 26, 2020

Motivation for this change

The range option still needs to be defined in dhcpd4 to be able to give out static IP addresses.

Fixes #93704.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@vcunat
Copy link
Member

vcunat commented Jul 26, 2020

I think the command goes like this:
@GrahamcOfBorg test networking.scripted.macvlan

Copy link
Member

@vcunat vcunat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, though I can't say I really know DHCP or VLANs well. (And it fixes the test locally.)

@chvp
Copy link
Member Author

chvp commented Jul 26, 2020

Looks good, though I can't say I really know DHCP or VLANs well. (And it fixes the test locally.)

I can't say I'm an expert either, but I noticed in the failing logs that it said there weren't any free addresses, which led me to try adding the range back in the config.

@@ -33,13 +33,15 @@ let
enable = true;
interfaces = map (n: "eth${toString n}") vlanIfs;
extraConfig = ''
authoritative;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #92638.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, I was pretty sure I tested it without the authoritative line and it didn't work. It does now though, so 🤷‍♀️.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That pull was only merged 20 hours ago.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but I only started working on this ~4 hours ago using then-current master.

The range option still needs to be defined in dhcpd4 to be able to give out static IP addresses
@chvp
Copy link
Member Author

chvp commented Jul 26, 2020

@GrahamcOfBorg test networking.scripted.macvlan

@mweinelt
Copy link
Member

I'm not sure dhcpd4 will like the overlap between static and dynamic leases.

@chvp
Copy link
Member Author

chvp commented Jul 26, 2020

All the examples I found (e.g. https://wiki.archlinux.org/index.php/Dhcpd) have overlapping static and dynamic leases.

@mweinelt
Copy link
Member

mweinelt commented Jul 26, 2020

Ah well, this works as long as the dynamic address hasn't been allocated to some other machine when the static lease gets introduced. So I wouldn't recommend such an overlap in practice, but it should work here.

@mweinelt
Copy link
Member

@GrahamcOfBorg test networking.scripted.macvlan

@mweinelt mweinelt merged commit 9bd0df3 into NixOS:master Jul 26, 2020
@chvp chvp deleted the fix-networking-macvlan branch July 26, 2020 11:17
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.

tests.networking.scripted.macvlan.x86_64-linux blocking nixos-unstable
3 participants