|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] Fix stubdom-dm using "grep" improperly
On 1/9/2011 9:09 PM, John Weekes wrote:
stubdom-dm uses "grep" on "xm list" output to determine whether it is
already running. The existing behavior is to use "grep $domname-dm"
but this will result in a false-positive in the case of another domU
running whose name ends with the full new name; for instance, if
"abctest-dm" is running, a new "test-dm" will spin forever, waiting
for it the end.
Any easy fix is to have it use "grep -w" instead of "grep", searching
for the whole word only.
It also might be worth considering a switch to "xl list" from "xm
list", here and in other places.
This bug appears to exist in xen-4.0-testing, as well.
Since it's a one-liner, a signed-off may not be needed, but just in
case..
Signed-off-by: John Weekes <lists.xen@xxxxxxxxxxxxxxxxxx>
Here's a corrected version done against the repo (i.e., with corrected
paths).
diff -r 7b4c82f07281 stubdom/stubdom-dm
--- a/stubdom/stubdom-dm Wed Jan 05 23:54:15 2011 +0000
+++ b/stubdom/stubdom-dm Mon Jan 10 02:28:48 2011 -0500
@@ -91,7 +91,7 @@
############
# stubdomain
# Wait for any previous stubdom to terminate
-while xm list | grep $domname-dm
+while xm list | grep -w $domname-dm
do
sleep 1
done
-John
stubdom-dm.patch
Description: Text Data
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|