Commit 858133f5 by Daniel Lezcano Committed by Daniel Lezcano

lxc-ps : fix the container name search

We don't have to check for the cgroup namespace name because the pid we are looking for is already in the list of the container owned by lxc and retrieved from the abstract socket command name. Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 5d42011a
......@@ -118,12 +118,9 @@ sub get_container {
my $container = '';
foreach ( @cgroup ) {
chomp;
# find the container name
if (m/[:,]ns[:,]/o) {
# container name after :/
s/.*:\///o;
$container = $_;
}
# find the container name after :/
s/.*:\///o;
$container = $_;
}
return $container;
}
......
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