-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
nixosTests.flannel: port to python, unbreak #85252
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
Conversation
This seems to be pretty trivial to backport to 20.03 as well. ZHF: #80379 |
@GrahamcOfBorg test flannel |
For reasons yet unknown, the vxlan backend doesn't work (at least inside the qemu networking), so this is moved to the udp backend. Note changing the backend apparently also changes the interface name, it's now `flannel0`, not `flannel.1` fixes NixOS#74941
e7cbe7d
to
28ef438
Compare
@GrahamcOfBorg test flannel |
node1.wait_until_succeeds("ip l show dev flannel0") | ||
ip1 = node1.succeed("ip -4 addr show flannel0 | grep -oP '(?<=inet).*(?=/)'") | ||
node2.wait_until_succeeds("ip l show dev flannel0") | ||
ip2 = node2.succeed("ip -4 addr show flannel0 | grep -oP '(?<=inet).*(?=/)'") |
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.
up until here both machines do not communicate with each other yet, right? But the code is 100% the same if i didn't misread anything. Can you deduplicate the code?
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.
The code is the same as before - I just added a step to wait for the interface to show up, as it sometimes wasn't there yet. We need to look up the other machines's IP address to do the pinging.
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.
LGTM. Test run clean on my machine. Sounds like vxlan-over-qemu-fabric might be to blame for the flakiness. I image a ton of plausible race-conditions in that stack :)
Thanks for looking into it. I'd still love if we could somehow test vxlan (to ensure more production-grade deployments work), but I agree having a flannel test with another backend is preferrable over a totally broken one. |
Motivation for this change
The flannel test was broken and still written in Perl.
For reasons yet unknown, the vxlan backend doesn't work (at least inside
the qemu networking), so this is moved to the udp backend.
Note changing the backend apparently also changes the interface name,
it's now
flannel0
, notflannel.1
fixes #74941
Python VM Test Migration: #72828
@johanot do you have an idea why it's broken inside qemu's networking?
#55649 suggests it once worked, so I'm curious.
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)