Skip to content
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

Moving an interface outside of the main netns does not deactivate the device unit #13982

Open
dechamps opened this issue Nov 9, 2019 · 0 comments
Labels

Comments

@dechamps
Copy link
Contributor

dechamps commented Nov 9, 2019

systemd version the issue has been seen with
242-7

Used distribution
Debian Unstable

Expected behaviour you didn't see
If I move a network interface out of the main network namespace, the device unit for that network interface should be deactivated, since systemd cannot manage it anymore.

(Alternatively, I would prefer if systemd could keep managing it and keep bound units alive, but from the discussion on #3939 I get the impression that's not how it's supposed to work.)

Unexpected behaviour you saw
If I move a network interface out of the main network namespace, the device unit for that network interface stays active. However, units bound to the device unit do get stopped, which is confusing.

Steps to reproduce the problem

test-device-ns.target:

[Unit]
BindsTo=sys-subsystem-net-devices-testiface.device
After=sys-subsystem-net-devices-testiface.device

Run:

# ip link add testiface type veth
# systemctl start test-device-netns.target
# ip netns add testns
# ip link set testiface netns testns

Then inspect the state of the sys-subsystem-net-devices-testiface.device and test-device-ns.target. The latter is stopped (which is the intended behaviour according to #3939), but the former is still active, which doesn't make a ton of sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants