-
Notifications
You must be signed in to change notification settings - Fork 37
Description
We migrate the external vhost server's process to a client slice by appending the external vhost's server PID to the cgroup.procs file. The rules for moving processes between slices have changed in cgroups v2:
A PID can be written to migrate the process associated with the PID to the cgroup. The writer should match all of the following conditions:
It must have write access to the “cgroup.procs” file.
It must have write access to the “cgroup.procs” file of the common ancestor of the source and destination cgroups.
The common ancestor of the source and destination Cgroups is the root, so the writer needs to have root privileges to migrate the process. Launching a blockstore-server or an external vhost server as root is unsafe, so we need to create a new SUID executable that will write the PID to the cgroup.proc file.