summaryrefslogtreecommitdiff
path: root/pkg/cgroups/cpu.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-07-11 13:24:39 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-07-11 18:07:48 +0200
commit1601100b3e9935f4239529c9117c76b8dd5d762a (patch)
tree6f93fdd5a38d5aebf73170d106de0d6c232d6576 /pkg/cgroups/cpu.go
parent144567b42dba2c8c426538a4b5fe7d718b43284a (diff)
downloadpodman-1601100b3e9935f4239529c9117c76b8dd5d762a.tar.gz
podman-1601100b3e9935f4239529c9117c76b8dd5d762a.tar.bz2
podman-1601100b3e9935f4239529c9117c76b8dd5d762a.zip
cgroups: attempt a recursive rmdir
if the cgroup cannot be deleted, then attempt to delete all its subdirectories and try again. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/cgroups/cpu.go')
-rw-r--r--pkg/cgroups/cpu.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/cgroups/cpu.go b/pkg/cgroups/cpu.go
index 1c8610cc4..03677f1ef 100644
--- a/pkg/cgroups/cpu.go
+++ b/pkg/cgroups/cpu.go
@@ -68,7 +68,7 @@ func (c *cpuHandler) Create(ctr *CgroupControl) (bool, error) {
// Destroy the cgroup
func (c *cpuHandler) Destroy(ctr *CgroupControl) error {
- return os.Remove(ctr.getCgroupv1Path(CPU))
+ return rmDirRecursively(ctr.getCgroupv1Path(CPU))
}
// Stat fills a metrics structure with usage stats for the controller