]> git.proxmox.com Git - pve-container.git/commit
lxc_config: mount /sys as mixed for unprivileged by default
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 18 Mar 2020 09:46:17 +0000 (10:46 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 19 Mar 2020 08:17:47 +0000 (09:17 +0100)
commit741b7737be763b2f89e2828b1ef94a9b890bff6f
treebf97fccaee8bf7bf4daeeebb831cac4c2c4df79d
parent8096ede639a5c970ee83c1777f1d1004735034a5
lxc_config: mount /sys as mixed for unprivileged by default

CONTAINER_INTERFACE[0] is something systemd people call their API and
we need to adapt to it a bit, even if it means doing stupid
unnecessary things, as else systemd decides to regress and suddenly
break network stack in CT after an upgrade[1].

This mounts the parent /sys as mixed, which is:
> mount /sys as read-only but with /sys/devices/virtual/net writable.
-- man 5 lxc.container.conf

Allow users to overwrite that with a features knob, as surely some
run into other issues else and manually adding a "lxc.mount.auto"
entry in the container .conf is not an nice user experience for most.

Fixes the system regression in up to date Arch installations
introduced by[2].

[0]: https://systemd.io/CONTAINER_INTERFACE/
[1]: https://github.com/systemd/systemd/issues/15101#issuecomment-598607582
[2]: https://github.com/systemd/systemd/commit/bf331d87171b7750d1c72ab0b140a240c0cf32c3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/PVE/LXC.pm
src/PVE/LXC/Config.pm