Subject: Re: [vserver] startup order
From: "John A. Sullivan III" <jsullivan@opensourcedevel.com>
Date: Mon, 20 Apr 2009 11:57:08 -0400
On Mon, 2009-04-20 at 20:52 +0800, Jeff Jansen wrote:
> Is there any way to set the order in which vservers are started by the
> util-vservers functions if you set "default" in apps/init/mark?
>
> The 'getAllVservers' function in "/usr/lib/util-vserver/function" that (I think)
> enumerates them seems to be a simple "for" loop through the conf dir
> ("/etc/vservers" in my case) which would pull them in alphabetical order. But
> that's not the order they start up in.
>
> Heartbeat kicks over all our vservers to our secondary vserver host if there's a
> problem with the primary, and I'd like to be able to control the order in which
> they stop and start.
>
> TIA
>
> Jeff Jansen
We used the "default" mechanism to set the order, i.e., a value in the
mark file which assigns the guest to a start up script. We created
several different init scripts with different load orders, e.g.,
vservers-94, vservers-95, vservers-96, etc. We then echo the
appropriate value into the mark file for the appropriate group. It
appears to be working fine. If you need more details, let me know -
John
--
John A. Sullivan III
Open Source Development Corporation
+1 207-985-7880
jsullivan@opensourcedevel.com
http://www.spiritualoutreach.com
Making Christianity intelligible to secular society