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

[Xen-devel] [PATCH 3 of 3] xencommons: Wait for xenstored to start befor

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 3 of 3] xencommons: Wait for xenstored to start before setting dom0 name
From: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Date: Mon, 28 Jun 2010 13:58:46 +0100
Cc: george.dunlap@xxxxxxxxxxxxx
Delivery-date: Mon, 28 Jun 2010 06:05:13 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1277729923@gdunlap-desktop>
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>
References: <patchbomb.1277729923@gdunlap-desktop>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.4.3
On one of my boxes, the xenstore-write setting dom0's name starts
before xenstored is actually ready to handle the connection properly,
resulting in the name set failing.  Wait for xenstored to be up and
responding to reads before continuing.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>

diff -r 9781a01f6ccb -r 60688cd86c83 tools/hotplug/Linux/init.d/xencommons
--- a/tools/hotplug/Linux/init.d/xencommons     Mon Jun 28 13:24:26 2010 +0100
+++ b/tools/hotplug/Linux/init.d/xencommons     Mon Jun 28 13:24:26 2010 +0100
@@ -44,8 +44,15 @@
                rm -f "$XENSTORED_ROOTDIR"/tdb* &>/dev/null
                test -z "$XENSTORED_TRACE" || XENSTORED_ARGS=" -T 
/var/log/xen/xenstored-trace.log"
 
-               echo Starting xenstored...
+               echo -n Starting xenstored...
                xenstored --pid-file=$XENSTORED_PIDFILE $XENSTORED_ARGS
+
+                while ! `xenstore-read -s / >/dev/null 2>&1` ; do
+                        echo -n .
+                        sleep 1
+                done
+               echo
+
                echo Setting domain 0 name...
                xenstore-write "/local/domain/0/name" "Domain-0"
        fi

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

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