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
Conversation
I think the command goes like this: |
There was a problem hiding this 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.)
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. |
nixos/tests/networking.nix
Outdated
@@ -33,13 +33,15 @@ let | |||
enable = true; | |||
interfaces = map (n: "eth${toString n}") vlanIfs; | |||
extraConfig = '' | |||
authoritative; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #92638.
There was a problem hiding this comment.
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 🤷♀️.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
e935a42
to
8eca34d
Compare
@GrahamcOfBorg test networking.scripted.macvlan |
I'm not sure dhcpd4 will like the overlap between static and dynamic leases. |
All the examples I found (e.g. https://wiki.archlinux.org/index.php/Dhcpd) have overlapping static and dynamic leases. |
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. |
@GrahamcOfBorg test networking.scripted.macvlan |
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
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)