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