Skip to content

[1.5] Fix netdev in CI#5357

Open
rata wants to merge 5 commits into
opencontainers:release-1.5from
rata:1.5-fix-CI
Open

[1.5] Fix netdev in CI#5357
rata wants to merge 5 commits into
opencontainers:release-1.5from
rata:1.5-fix-CI

Conversation

@rata

@rata rata commented Jun 30, 2026

Copy link
Copy Markdown
Member

Backport of #5324 for 1.5. Not sure why it wasn't failing before, I_ think it was only rawhide and maybe now the patch landed in another fedora version (it seems 1.5 is using fedora 44 now)?

Anyways, here is the fix.

kolyshkin and others added 5 commits June 30, 2026 15:59
Once we add a new network device, systemd-udev may execute some rules.
In particular, we see that on Fedora it sets the MAC address (presumably
based on the host name and device name). This setting races with ours
'ip link set address', as a result, "checkpoint and restore with netdevice"
test sometimes fails telling the MAC address is not as expected.

In the future there may be some other udev rules etc., so the overall
solution is to wait until systemd-udev is finished applying the rules,
thus eliminating the race.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit b2ada85)
We are creating the interface for every test, but there is only one
using it. Let's just call the function to create the netdev on the test
that uses it.

I guess that was the reason we had the "ip link del ..." in teardown.
Because in a lot of tests we were just creating and deleting the
interface on the host.

While we are there, as suggested by lifubang, let's make the "ip link
add" line specify the mtu and mac addr. This way, the interface is not
created without that info and we race with host daemons (like udev) that
_might_ want to change it.

Signed-off-by: Rodrigo Campos <rodrigo@amutable.com>
(cherry picked from commit b16ed9a)
The cleaning is condition on this variable being set. So let's unset it
after we clean the resources.

Signed-off-by: Rodrigo Campos <rodrigo@amutable.com>
(cherry picked from commit e79bff7)
We try to delete the interface, but it lot of tests it won't be there
unless we failed to move it to the container. Let's just clarify that in
a comment and redirect the error output to /dev/null, as it seems an
error otherwise while it is completely normal.

Signed-off-by: Rodrigo Campos <rodrigo@amutable.com>
(cherry picked from commit bb9d1cc)
Signed-off-by: Rodrigo Campos <rodrigo@amutable.com>
(cherry picked from commit e6aea33)
@rata rata marked this pull request as ready for review June 30, 2026 14:04
@rata rata changed the title 1.5 fix ci [1.5] Fix netdev in CI Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants