*: constify cgroups stuff
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
c199f63dba
commit
f51ca87857
4 changed files with 17 additions and 8 deletions
|
@ -38,6 +38,10 @@ const (
|
|||
seccompUnconfined = "unconfined"
|
||||
seccompRuntimeDefault = "runtime/default"
|
||||
seccompLocalhostPrefix = "localhost/"
|
||||
|
||||
scopePrefix = "crio"
|
||||
defaultCgroupfsParent = "/crio"
|
||||
defaultSystemdParent = "system.slice"
|
||||
)
|
||||
|
||||
func addOCIBindMounts(sb *sandbox.Sandbox, containerConfig *pb.ContainerConfig, specgen *generate.Generator) ([]oci.ContainerVolume, error) {
|
||||
|
@ -472,11 +476,10 @@ func (s *Server) createSandboxContainer(ctx context.Context, containerID string,
|
|||
}
|
||||
|
||||
var cgPath string
|
||||
scopePrefix := "crio"
|
||||
parent := "/crio"
|
||||
useSystemd := s.config.CgroupManager == "systemd"
|
||||
parent := defaultCgroupfsParent
|
||||
useSystemd := s.config.CgroupManager == oci.SystemdCgroupsManager
|
||||
if useSystemd {
|
||||
parent = "system.slice"
|
||||
parent = defaultSystemdParent
|
||||
}
|
||||
if sb.CgroupParent() != "" {
|
||||
parent = sb.CgroupParent()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue