WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Olaf Hering <olaf@xxxxxxxxx>
Subject: Re: [Xen-devel] recursive error in xen-hotplug-common.sh
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Thu, 16 Dec 2010 10:38:23 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 16 Dec 2010 02:39:50 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20101215193039.GA9053@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <20101215193039.GA9053@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>