[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] how to start VMs in a particular order



lee <lee@xxxxxxxxxxxxxxx> wrote:

>> Likewise, many ways exist to achieve what you (and I) want. I do not know of 
>> an existing tool that does this simply. On a different list, people talk 
>> about 
>> using puppet or adding additional scripts as dependencies.
> 
> I wish it was a feature of xen --- that would make sense, but how would
> xen know when a VM is fully up ...

The more I think about this, the more I think a good generic method is better 
than having Xen do it.

Have the Xen startup scripts handle it and you can only handle dependencies 
within a single Xen host - have a generic method and it will still work when 
you add a second Xen host, or have bare-metal machines.

One way that comes to mind would be to have a startup script (for example, 
wait_for_dns) which :
1) Waits (with optional timeout) for a specific service to be available - in 
this case a DNS resolver
2) "provides" the wait_for_<something> service

Then anything that requires the service can have it's dependencies altered to 
require the wait_for_<something> service.

Eg, just looking on a random box, ntp has this section :
> ### BEGIN INIT INFO
> # Provides:        ntp
> # Required-Start:  $network $remote_fs $syslog
> # Required-Stop:   $network $remote_fs $syslog
> # Default-Start:   2 3 4 5
> # Default-Stop: 
> # Short-Description: Start NTP daemon
> ### END INIT INFO

Change Required-Start to be "$network $remote_fs $syslog $wait_for_dns", rerun 
the init-script setup, and then you have a system that would pause for the DNS 
to be available before it started the ntp service.

The advantage over waiting for a service to be available before starting a 
guest at all is that you can still have parallel startup of multiple machines - 
they just go so far and wait for any dependencies. In effect that's what I 
believe the dependency based startup system is supposed to do within a single 
host - allow services to start in parallel, but only start each service when 
all it's dependencies are met.


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.