[lxc-devel] Two patches for the lxc-0.8.0-rc1 version of lxc-ps
Robert Vogelgesang
vogel at users.sourceforge.net
Wed Mar 7 14:56:57 UTC 2012
Hello all,
this is my first post to this list, and at first I want to thank the
developers of the lxc package for their work. I really appreciate the
efforts in developing further options and features, while keeping
backward compatibility with older linux kernels.
Background: I'm evaluating the lxc package in a RHEL-6.2 / Centos 6.2 /
Scientific Linux 6.2 environment, with kernel 2.6.32-220.4.2.el6.
During these tests I noticed some problems in lxc-0.8.0-rc1, and some
of them are fixed by git commit fc3c7f7f6e9d8adfc4be943160e4ef902436a25d.
Two of the remaining issues, both in lxc-ps, are fixed by the two
patches I have created and attached to this mail. Maybe there are
better ways to fix these issues, but the two patches work for me.
Yours,
Robert
-------------- next part --------------
This patch fixes an issue in the lxc-0.8.0-rc1 version of lxc-ps
which is related to the latest changes to the configure script.
diff -u lxc-0.8.0-rc1/src/lxc/lxc-ps.in.pathconf lxc-0.8.0-rc1/src/lxc/lxc-ps.in
--- lxc-0.8.0-rc1/src/lxc/lxc-ps.in.pathconf 2012-03-01 22:42:19.000000000 +0100
+++ lxc-0.8.0-rc1/src/lxc/lxc-ps.in 2012-03-07 14:19:54.689226264 +0100
@@ -37,7 +37,8 @@
sub get_container_names {
my $ref_names = shift;
- my $lxcpath = '@LXCPATH@';
+ my $localstatedir = '@LOCALSTATEDIR@';
+ my $lxcpath = "@LXCPATH@";
open(active, "netstat -xa | grep $lxcpath |") or return;
while(<active>) {
-------------- next part --------------
This patch fixes an issue in the lxc-0.8.0-rc1 version of lxc-ps
similar to an issue fixed by commit
fc3c7f7f6e9d8adfc4be943160e4ef902436a25d in lxc-ls, i. e. when using
ns cgroup.
diff -u lxc-0.8.0-rc1/src/lxc/lxc-ps.in.nscgroupps lxc-0.8.0-rc1/src/lxc/lxc-ps.in
--- lxc-0.8.0-rc1/src/lxc/lxc-ps.in.nscgroupps 2012-03-01 22:42:19.000000000 +0100
+++ lxc-0.8.0-rc1/src/lxc/lxc-ps.in 2012-03-07 13:56:06.507237452 +0100
@@ -79,6 +79,8 @@
for (@{$ref_names}) {
my $task_file = "$$ref_cgroup/$init_cgroup/lxc/$_/tasks";
+ $task_file = "$$ref_cgroup/$init_cgroup/$_/tasks"
+ unless -f $task_file;
$LXC_NAMES{$_} = 1;
open(tasks, "cat $task_file 2>/dev/null |") or next;
More information about the lxc-devel
mailing list