make sure destroy_container really destroys it

Because libcgroup is heavily cached and operates in its in-memory
data structures, cgroup deletion doesn't really work these days.
We see no error message, but the hierarchies are still present in
the filesystem.

For that, we need to make sure that all controllers are in sync with
the on-disk version. We do this by issuing cgroup_get_cgroup() before
deletion. If that returns an error because the cgroup doesn't exist,
we don't bother too much.

This is verified by me to fix this. The cgroup now really goes away
after we call destroy.

Signed-off-by: Glauber Costa <glommer@parallels.com>
1 file changed