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-users

Re: [Xen-users] domU autostart with deps

To: Christoph Kaminski <mangel@xxxxxx>
Subject: Re: [Xen-users] domU autostart with deps
From: Thomas Goirand <thomas@xxxxxxxxxx>
Date: Tue, 23 Jun 2009 06:38:38 +0800
Cc: xen-users <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 22 Jun 2009 15:39:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A3FE84A.9030709@xxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Openpgp: id=98EF9A49
Organization: GPLHost
References: <4A3DEB14.70505@xxxxxx> <555ed20a0906221147j5878cc68u6b57762b81425f38@xxxxxxxxxxxxxx> <4A3FE84A.9030709@xxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103)
Christoph Kaminski wrote:
> Costas Drogos schrieb:
>>
>> If by "dependencies" you mean a service in a domU that must be started
>> before the other domU boots, e.g. a NFS server or a database, you
>> could check from dom0 when this service is up so to boot the other
>> machine.
>>
>> As previous folks told, there is no Xen way to do that, because Xen
>> has nothing to do with userspace applications, so you have to use a
>> script of your own, which would be highly dependable on the
>> "dependencies" you have.
>>
>> Maybe if you could clarify the "dependencies" you need to resolve,
>> someone could help :)
>>
>>
> 
> With dependencies mean the whole host completely started.
> 
> start host a
> wait till all services started on host a
> start host b
> and so on...
> 
> Greetz

Hi,

Your only hope here is that your booted host tells the dom0 that it has
started. One of the solution could be to setup ssh keys, so that your
"host a" can log into your dom0, then do something like that in your
/etc/rc.local:

ssh dom0-ip 'touch /var/lib/script-name-of-your-choice/host-a-booted'

Then you could do a startup script like this:

xm create host-a
while [ ! -e /var/lib/script-name-of-your-choice/host-a-booted ] ; do
        sleep 5
done
xm create host-b

There might be 1000 other ways of doing this, but this one is easy to
implement. Maybe you want to have some kind of limits in the while loop,
and maybe some alerting to let you know if host-a never wrote the file.

I hope that helps, this is just a 2 cents script helping written from
top of my head as you seem to be turning in loops searching for a
solution...

Thomas

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

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