oci: add a note about crio-conmon- sub-cgroup with cgroupfs

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca 2017-09-05 17:21:17 +02:00
parent f9bf4b15e8
commit a51bc9753f
No known key found for this signature in database
GPG key ID: B2BEAD150DE936B9

View file

@ -202,6 +202,10 @@ func (r *Runtime) CreateContainer(c *Container, cgroupParent string) error {
if err != nil { if err != nil {
logrus.Warnf("Failed to add conmon to cgroupfs sandbox cgroup: %v", err) logrus.Warnf("Failed to add conmon to cgroupfs sandbox cgroup: %v", err)
} else { } else {
// XXX: this defer does nothing as the cgroup can't be deleted cause
// it contains the conmon pid in tasks
// we need to remove this defer and delete the cgroup once conmon exits
// maybe need a conmon monitor?
defer control.Delete() defer control.Delete()
if err := control.Add(cgroups.Process{Pid: cmd.Process.Pid}); err != nil { if err := control.Add(cgroups.Process{Pid: cmd.Process.Pid}); err != nil {
logrus.Warnf("Failed to add conmon to cgroupfs sandbox cgroup: %v", err) logrus.Warnf("Failed to add conmon to cgroupfs sandbox cgroup: %v", err)