Skip to content

[NBS] Added CGROUPSv2 support for local disks #4734

@vladstepanyuk

Description

@vladstepanyuk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions