Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
conf: improve read-only /sys with read-write /sys/devices/virtual/net
Some tools require /sys/devices/virtual/net to be read-write. At the same time we want all other parts of /sys to be read-only. To do this we created a layout where we hade a read-only instance of sysfs mounted on top of a read-write instance of sysfs: `-/sys sysfs sysfs rw,nosuid,nodev,noexec,relatime `-/sys sysfs sysfs ro,nosuid,nodev,noexec,relatime |-/sys/devices/virtual/net sysfs sysfs rw,relatime | `-/sys/devices/virtual/net sysfs[/devices/virtual/net] sysfs rw,nosuid,nodev,noexec,relatime This causes issues for systemd services that create a separate mount namespace as they get confused to what mount options need to be respected. Simplify our mounting logic so we end up with a single read-only mount of sysfs on /sys and a read-write bind-mount of /sys/devices/virtual/net: ├─/sys sysfs sysfs ro,nosuid,nodev,noexec,relatime │ ├─/sys/devices/virtual/net sysfs[/devices/virtual/net] sysfs rw,nosuid,nodev,noexec,relatime Link: systemd/systemd#20032 Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
- Loading branch information