nspawn: wait for network namespace creation before interface setup#8633
nspawn: wait for network namespace creation before interface setup#8633filbranden merged 1 commit intosystemd:masterfrom
Conversation
Otherwise, network interfaces can be "moved" into the container's namespace while it's still the same as the host namespace, in which case e.g. host0 for a veth ends up on the host side instead of inside the container. Regression introduced in 0441378. Fixes systemd#8599.
|
(Re-pushed because I had wrapped the commit message wrong. Magit update broke my hook.) |
|
looks superficially ok. I trust you tested this sufficiently? @AlexMekkering @Toolybird @SjonHortensius any chance you can give this a whirl too? |
There was a problem hiding this comment.
I have applied #8507 as well as this patch on top of the current Archlinux release to build 238-51 successfully.
Where the unpatched release creates host0@vb-xxx on the host instead of the container, leaving the container without a network; I can confirm this patch fixes this.
The host0 interface gets created inside the container which makes it have a successful network connection. I assume this will also fix any second or third container which previously failed
|
@poettering I tested with several combinations of network options to make sure it didn't deadlock, and it's been working for my own use case. I guess it's a moot point since it's already merged now, but yes, I've tested and I'm fairly confident that it isn't breaking anything. |
This fixes #8599 for me. Not sure if this is the best solution, but I think it makes sense.
This is my first time hacking on systemd and I knew nothing about this code as of 3 hours ago, so apologies in advance for anything I might have done wrong. Happy to make changes if necessary.
cc @AlexMekkering @Toolybird @SjonHortensius who also had this issue.