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

cpuset weirdness



Hi,

I have the following CPUset definitions (some of these jails are
disabled, but it shouldn't matter): 

# awk -F\" '/cpuset/ {print "\"" $2 "\""}' *
"0,6"
"0,5"
"7,5"
"7,5"
"1,7"
"3,4"
"2,4"
"4,5"
"6,4"
"3,6"
"1,2"
"5,1"
""
"5,2"
""
"6,7"
"2,3"
"1,4"

This looks perfectly normal to me, and it works fine for most jails,
but ezjail-admin start yields:
# ezjail-admin start
-snip-
 cpuset: setaffinity: Resource deadlock avoided
Error: The defined cpuset is malformed

The machine does have 8 CPUs, so 0-7 should be valid.

Can somebody clarify what's going on?
Also, I believe ezjail should print the jailname where the cpuset fails.

I tried the following change, but it didn't change the output *at all*
(i.e., not even the "for jail" shows up in the output), so I believe
someone who is more familiar with ezjail's codebase should do it.

--- /usr/local/bin/ezjail-admin.orig	2011-07-21 08:12:04.000000000 +0000
+++ /usr/local/bin/ezjail-admin	2012-06-16 19:42:36.000000000 +0000
@@ -1256,7 +1256,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 ${jail_name} is malformed."
     ezjail_cpuset="${ezjail_new_cpuset}"
   fi


Best regards,

Moritz