microvm.nix interface creation logic is racey #289

Open
opened 2025-08-27 00:52:41 +00:00 by raito · 0 comments
Owner

Upon very fast start of new microVMs with no assigned interfaces:

Aug 27 00:51:28 lix-hv01 microvm@lix-zulip01[2777864]: /var/lib/microvms/lix-zulip01/current/bin/microvm-run: line 53: /sys/class/net/vm-ff9b-wan/ifindex: No such file or directory
Aug 27 00:51:28 lix-hv01 microvm@lix-zulip01[2777864]: /var/lib/microvms/lix-zulip01/current/bin/microvm-run: line 53: /dev/tap: Permission denied

can happen.

This suggest a race in interface creation. It's unsurprising as microvm.nix is a pile of Bash in too many areas and should probably rely more on networkd or similar.

Upon very fast start of new microVMs with no assigned interfaces: ``` Aug 27 00:51:28 lix-hv01 microvm@lix-zulip01[2777864]: /var/lib/microvms/lix-zulip01/current/bin/microvm-run: line 53: /sys/class/net/vm-ff9b-wan/ifindex: No such file or directory Aug 27 00:51:28 lix-hv01 microvm@lix-zulip01[2777864]: /var/lib/microvms/lix-zulip01/current/bin/microvm-run: line 53: /dev/tap: Permission denied ``` can happen. This suggest a race in interface creation. It's unsurprising as microvm.nix is a pile of Bash in too many areas and should probably rely more on networkd or similar.
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: the-distro/infra#289
No description provided.