-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use systemd dbus StartTransientUnit for unpriv cgroup2
If, when init'ing cgroups for a container start, we detect that we are an unprivileged user on a unified-hierarchy-only system, then we try to request systemd, through dbus api, to create a new scope for us with delegation. Call the cgroup it creates for us P1. We then create P1/init, move ourselves into there, so we can enable the controllers for delegation to P1's children through P1/cgroup.subtree_control. On attach, we try to request systemd attach us to the container's scope. We can't do that ourselves in the normal case, as root owns our login cgroups. Create a new command api for the lxc monitor to tell lxc-attach the systemd scope to which to attach. Changelog: * free cgroup_meta.systemd_scope in lxc_conf_free (Thanks Tycho) * fix some indent * address some (not all) of brauner's feedback Signed-off-by: Serge Hallyn <[email protected]>
- Loading branch information
Showing
12 changed files
with
524 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.