mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-01 05:04:26 +00:00
runtime: remove prefix when cgroups are managed by systemd
as done previously in 9949daf4dc
Signed-off-by: Snir Sheriber <ssheribe@redhat.com>
This commit is contained in:
parent
5e230a1cba
commit
7362e1e8a9
@ -590,10 +590,12 @@ func (s *Sandbox) createCgroups() error {
|
|||||||
// CPUSet.
|
// CPUSet.
|
||||||
// For the sandbox cgroups we create and manage, rename the base of the cgroup path to
|
// For the sandbox cgroups we create and manage, rename the base of the cgroup path to
|
||||||
// include "kata_"
|
// include "kata_"
|
||||||
|
if !cgroups.IsSystemdCgroup(cgroupPath) { // don't add prefix when cgroups are managed by systemd
|
||||||
cgroupPath, err = cgroups.RenameCgroupPath(cgroupPath)
|
cgroupPath, err = cgroups.RenameCgroupPath(cgroupPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if spec.Linux.Resources != nil {
|
if spec.Linux.Resources != nil {
|
||||||
resources.Devices = spec.Linux.Resources.Devices
|
resources.Devices = spec.Linux.Resources.Devices
|
||||||
|
Loading…
Reference in New Issue
Block a user