summaryrefslogtreecommitdiff
path: root/libpod/oci_linux.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-06-19 11:13:18 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-06-26 13:17:02 +0200
commit72cf0c81e86435c1c8daed9bff183b20d6bc400c (patch)
tree09ce3687ec7977ac2a027639e376db3586979bc2 /libpod/oci_linux.go
parentfa1869381301797295dece0aec12435fc902295b (diff)
downloadpodman-72cf0c81e86435c1c8daed9bff183b20d6bc400c.tar.gz
podman-72cf0c81e86435c1c8daed9bff183b20d6bc400c.tar.bz2
podman-72cf0c81e86435c1c8daed9bff183b20d6bc400c.zip
libpod: use pkg/cgroups instead of containerd/cgroups
use the new implementation for dealing with cgroups. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod/oci_linux.go')
-rw-r--r--libpod/oci_linux.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/libpod/oci_linux.go b/libpod/oci_linux.go
index 07bc4e5f3..7d9f47ae2 100644
--- a/libpod/oci_linux.go
+++ b/libpod/oci_linux.go
@@ -15,8 +15,8 @@ import (
"syscall"
"time"
- "github.com/containerd/cgroups"
"github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/pkg/cgroups"
"github.com/containers/libpod/pkg/rootless"
"github.com/containers/libpod/pkg/util"
"github.com/containers/libpod/utils"
@@ -49,13 +49,13 @@ func (r *OCIRuntime) moveConmonToCgroup(ctr *Container, cgroupParent string, cmd
}
} else {
cgroupPath := filepath.Join(ctr.config.CgroupParent, "conmon")
- control, err := cgroups.New(cgroups.V1, cgroups.StaticPath(cgroupPath), &spec.LinuxResources{})
+ control, err := cgroups.New(cgroupPath, &spec.LinuxResources{})
if err != nil {
logrus.Warnf("Failed to add conmon to cgroupfs sandbox cgroup: %v", err)
} else {
// we need to remove this defer and delete the cgroup once conmon exits
// maybe need a conmon monitor?
- if err := control.Add(cgroups.Process{Pid: cmd.Process.Pid}); err != nil {
+ if err := control.AddPid(cmd.Process.Pid); err != nil {
logrus.Warnf("Failed to add conmon to cgroupfs sandbox cgroup: %v", err)
}
}