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] run a script before creating domain

To: James Harper <james.harper@xxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] run a script before creating domain
From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Date: Fri, 13 Jan 2006 11:47:30 +0000
Cc: Xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 13 Jan 2006 11:54:12 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AEC6C66638C05B468B556EA548C1A77DAF0496@xxxxxxxxxxxxxxxxxxxxxxx>
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: <AEC6C66638C05B468B556EA548C1A77DAF0496@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Fri, Jan 13, 2006 at 11:57:48AM +1100, James Harper wrote:

> I seem to be living in constant fear of starting the same domain on more
> than one machine at once. As a way of preventing this, I'd like to be
> able to have a script execute as part of an 'xm create' that runs before
> doing any of the actual domain creation.
> 
> At the moment, all I'd do is do a 'ping' to see if the domain is up and
> running. Not foolproof but would save me >99% of the time. In a cluster
> environment there should be a way to determine remotely if a domain is
> running.

For such a quick-and-dirty check, couldn't you just write yourself a wrapper
script that did the ping and then called xm create?

If you want to do this properly, then inside Xend would be the best place, as
Mark Williamson suggests.  XendRoot handles the config file and the script
directories (see XendRoot.get_network_script for example).

Cheers,

Ewan.

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

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