Commit a6688339 authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

zdtm/cgroup02: remove subgroups in the cleanup hook

systemd executes tests in subgroups:
 9679 ?        Ssl    0:41 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib/jenkins/jenkins.war -
[root@jenkins ~]# cat /proc/9679/cgroup
10:net_cls:/
9:hugetlb:/
8:cpuset:/
7:blkio:/system.slice
6:freezer:/
5:cpu,cpuacct:/system.slice
4:devices:/system.slice/jenkins.service
3:perf_event:/
2:memory:/system.slice
1:name=systemd:/system.slice/jenkins.service

Reported-by: Mr Jenkins
Signed-off-by: 's avatarAndrew Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 45bc46ed
......@@ -8,7 +8,12 @@ rmroots() {
mount -t cgroup none $tname -o "$1"
for d in "$tname/oldroot" "$tname/newroot" "$tname/zdtmtstroot"; do
test -d "$d" && rmdir "$d"
test -d "$d" || continue
# sort by line length
for i in `find $d -type d | awk '{print length, $0}' | sort -rn | cut -d " " -f2-`; do
echo $i
rmdir $i
done
done
echo "Left there is:"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment