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

Re: [Xen-devel] recursive error in xen-hotplug-common.sh



On Wed, 2010-12-15 at 19:30 +0000, Olaf Hering wrote:
> Current xen-unstable does not have backend/vbd/1/768/params for some
> reason.  This causes xenstore_read() in xen-hotplug-common.sh to call
> fatal().  fatal() calls xenstore_write(). If xenstore-write happens to
> fail, fatal() is called once again. Now the block script is busy.
> 
> I have added the set -x output, preceded by the env and set output:


Presumably something like this helps?

diff -r 0236d8adb081 tools/hotplug/Linux/xen-hotplug-common.sh
--- a/tools/hotplug/Linux/xen-hotplug-common.sh Thu Dec 16 09:33:54 2010 +0000
+++ b/tools/hotplug/Linux/xen-hotplug-common.sh Thu Dec 16 10:06:38 2010 +0000
@@ -29,8 +29,8 @@ unset $(set | grep ^LC_ | cut -d= -f1)
 unset $(set | grep ^LC_ | cut -d= -f1)
 
 fatal() {
-  xenstore_write "$XENBUS_PATH/hotplug-error" "$*" \
-                 "$XENBUS_PATH/hotplug-status" error
+  _xenstore_write "$XENBUS_PATH/hotplug-error" "$*" \
+                  "$XENBUS_PATH/hotplug-status" error
   log err "$@"
   exit 1
 }
@@ -80,15 +80,23 @@ xenstore_read_default() {
 
 
 ##
+# _xenstore_write (<path> <value>)+
+#
+# Write each of the key/value pairs to the store.
+#
+_xenstore_write() {
+  log debug "Writing $@ to xenstore."
+  xenstore-write "$@"
+}
+
+##
 # xenstore_write (<path> <value>)+
 #
 # Write each of the key/value pairs to the store, and exit this script if any
 # such writing fails.
 #
 xenstore_write() {
-  log debug "Writing $@ to xenstore."
-  xenstore-write "$@" || fatal "Writing $@ to xenstore failed."
+  _xenstore_write "$@" || fatal "Writing $@ to xenstore failed."
 }
 
-
 log debug "$@" "XENBUS_PATH=$XENBUS_PATH"



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.