[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ezjail] cpuset weirdness



On Mon, Jul 02, 2012 at 13:27:17 +0200, Philipp Wuensche wrote:
> Please try your patch with ${ezjail} instead of ${jail_name}. This
> should give you the name of the jail with the problem.

Thanks for the hint.
The problem why "for jail" didn't show up is that the same change needs
to be made in the rc.d script as well as ezjail-admin. Now it shows
which jail causes the problem. Updated diff against CVS trunk ahead.

Best regards,

Moritz


Index: ezjail-admin
===================================================================
RCS file: /home/cvsroot/ezjail/ezjail-admin,v
retrieving revision 1.290
diff -u -r1.290 ezjail-admin
--- ezjail-admin	6 May 2012 00:58:06 -0000	1.290
+++ ezjail-admin	2 Jul 2012 11:40:25 -0000
@@ -1328,7 +1328,7 @@
   [ "${ezjail_new_fib}" ] && ezjail_fib="${ezjail_new_fib}"
   if [ "${ezjail_new_cpuset}" ]; then
     # Configure the new cpuset if the jail is currently running
-    [ "${ezjail_id}" ] && /usr/bin/cpuset -l ${ezjail_new_cpuset} -j ${ezjail_id} || exerr "Error: The defined cpuset is malformed."
+    [ "${ezjail_id}" ] && /usr/bin/cpuset -l ${ezjail_new_cpuset} -j ${ezjail_id} || exerr "Error: The defined cpuset for jail ${ezjail} is malformed."
     ezjail_cpuset="${ezjail_new_cpuset}"
   fi
 
Index: ezjail.sh
===================================================================
RCS file: /home/cvsroot/ezjail/ezjail.sh,v
retrieving revision 1.60
diff -u -r1.60 ezjail.sh
--- ezjail.sh	8 Mar 2012 22:33:40 -0000	1.60
+++ ezjail.sh	2 Jul 2012 11:40:25 -0000
@@ -119,7 +119,7 @@
       done
 
       # Configure processor sets for the jail via cpuset(1)
-      [ -z "${ezjail_cpuset}" ] || /usr/bin/cpuset -l ${ezjail_cpuset} -j ${ezjail_id} || echo -n "Error: The defined cpuset is malformed"
+      [ -z "${ezjail_cpuset}" ] || /usr/bin/cpuset -l ${ezjail_cpuset} -j ${ezjail_id} || echo -n "Error: The defined cpuset for jail ${ezjail} is malformed"
     done
   fi