pid1: do not fail if we get EPERM while setting up network name
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 28 Feb 2020 13:49:17 +0000 (14:49 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 29 Feb 2020 10:33:19 +0000 (19:33 +0900)
commitee00d1e95e84cec29a68c27af324f3baac91a4a4
tree931b61a126ff73f79687b922d93f50a7ee56ffa0
parentecf63c91025b1692d48886b57dae3896ab12c54c
pid1: do not fail if we get EPERM while setting up network name

In a user namespace container:
Feb 28 12:45:53 0b2420135953 systemd[1]: Starting Home Manager...
Feb 28 12:45:53 0b2420135953 systemd[21]: systemd-homed.service: Failed to set up network namespacing: Operation not permitted
Feb 28 12:45:53 0b2420135953 systemd[21]: systemd-homed.service: Failed at step NETWORK spawning /usr/lib/systemd/systemd-homed: Operation not permitted
Feb 28 12:45:53 0b2420135953 systemd[1]: systemd-homed.service: Main process exited, code=exited, status=225/NETWORK
Feb 28 12:45:53 0b2420135953 systemd[1]: systemd-homed.service: Failed with result 'exit-code'.
Feb 28 12:45:53 0b2420135953 systemd[1]: Failed to start Home Manager.

We should treat this similarly to the case where network namespace are not
supported at all.

https://bugzilla.redhat.com/show_bug.cgi?id=1807465
src/core/execute.c