Skip to content

systemd-nspawn+macvlan "could not bring up interface: Device or resource busy" #680

@SjonHortensius

Description

@SjonHortensius

I use systemd-nspawn with macvlan on a few different machines; and all of them suffer the same issue. Containers (which boot successfully) cannot be restarted; their network-connection will fail 99% of the time. I use the following overload:

# cat /etc/systemd/system/systemd-nspawn\@.service.d/start-network-macvlan.conf 
[Service]
ExecStart=
ExecStart=/usr/bin/systemd-nspawn --quiet --keep-unit --boot --link-journal=guest --network-macvlan=br-lan --machine=%I

Sometimes the reboot works (at least with v221); but most of the times it errors with either:

systemd-networkd[29]: mv-br-lan: Cannot configure IPv4 forwarding for interface mv-br-lan: Read-only file system
systemd-networkd[29]: Enumeration completed
systemd-networkd[29]: mv-br-lan: mv-br-lan       : could not bring up interface: Device or resource busy
systemd-networkd[29]: mv-br-lan: mv-br-lan       : could not set route: Network is unreachable
systemd-networkd[29]: mv-br-lan: Configured

or (another machine):

systemd-networkd[23]: mv-enp0s25: Cannot configure IPv4 forwarding for interface mv-enp0s25: Read-only file system
systemd-networkd[23]: mv-enp0s25: Cannot configure IPv6 forwarding for interface: Read-only file system
systemd-networkd[23]: Enumeration completed
systemd-networkd[23]: mv-enp0s25: mv-enp0s25      : could not bring up interface: Device or resource busy

This still happens with systemd-222, is there any way for me to debug this? Right now I have to restart the whole host to get the container to function again. I think something related to cgroups or the vlan hangs after the container is stopped; preventing a successful restart

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Programming errors, that need preferential fixingnetworknspawn

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions