[lxc/lxc] 53b2f3: use 2 sysfs instances for sys:mixed

0 views
Skip to first unread message

Christian Brauner

unread,
Dec 3, 2021, 9:46:43 AM12/3/21
to lxc-...@lists.linuxcontainers.org
Branch: refs/heads/master
Home: https://github.com/lxc/lxc
Commit: 53b2f3d5da9834f9763ba335a8fdb470e0b1cf2c
https://github.com/lxc/lxc/commit/53b2f3d5da9834f9763ba335a8fdb470e0b1cf2c
Author: Wolfgang Bumiller <w.bum...@proxmox.com>
Date: 2021-12-03 (Fri, 03 Dec 2021)

Changed paths:
M src/lxc/conf.c

Log Message:
-----------
use 2 sysfs instances for sys:mixed

In order to facilitate this, the default mount list's
'destination' may now be NULL to mean that the source should
be unmounted instead.

Here's what we need to do:

1) Ensure the first sysfs mount point is writable.
2) Mount a read-only sysfs on /sys
3) Bind devices/virtual/net *writably* into /sys

We use /proc/sys as a staging directory for the first sysfs
mount in read-write mode, then mount /sys r/o. Afterwards we
bind the r/w devices/virtual/net and unmount the staging
/proc/sys mount point.

The staging directory would not be required with the new
mount API, but this way we can support the old API and keep
the general workflow in the `default_mounts`.

Once we drop support for the old mount API, the
default_mounts table could just get a subdirectory field to
mount subdirectories directly.

Signed-off-by: Wolfgang Bumiller <w.bum...@proxmox.com>


Commit: ce7217259259e2331de5bf447a0080a55e7129d1
https://github.com/lxc/lxc/commit/ce7217259259e2331de5bf447a0080a55e7129d1
Author: Christian Brauner <christia...@ubuntu.com>
Date: 2021-12-03 (Fri, 03 Dec 2021)

Changed paths:
M src/lxc/conf.c

Log Message:
-----------
Merge pull request #4042 from Blub/2021-12-03/two-sysfs-instances-main

use 2 sysfs instances for sys:mixed


Compare: https://github.com/lxc/lxc/compare/9873fb06d8b0...ce7217259259
Reply all
Reply to author
Forward
0 new messages