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] Race with hotplug vif scripts

To: Jacob Gorm Hansen <jacobg@xxxxxxx>
Subject: Re: [Xen-devel] Race with hotplug vif scripts
From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Date: Tue, 2 Jan 2007 14:51:23 +0000
Cc: xen-devel <Xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 02 Jan 2007 06:51:08 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1167504768.4895.14.camel@xxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1167504768.4895.14.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Sat, Dec 30, 2006 at 07:52:48PM +0100, Jacob Gorm Hansen wrote:

> hi,
> 
> I have a domU running a custom HTTP client. As soon as the domain is
> booted and the VIF running it wants to initiate a connection. However, I
> seem to be having a race where the domU starts using the VIF before it
> is completely functional, probably because the hotplug script has not
> completed.
> 
> Currently I just set the frontend to '4', and just wait for the backend
> state to also become '4' (connected), but this does not work in all
> cases. How can I synchronize with the hotplug script, and what is the
> correct sequence of XenBus states?

You can sync with the hotplug script using the store: the scripts write to
/local/domain/0/backend/<devclass>/<domid>/<devid>/hotplug-status, writing
either "error" or "connected" when they are done (see xen-hotplug-common.sh).
Xend uses this to make sure that the domain does not get unpaused until the
hotplugging is done, and your toolstack could do the same.

HTH,

Ewan.

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

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-devel] Race with hotplug vif scripts, Ewan Mellor <=