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

[Xen-users] RE: OT: Staging startups for dependent machines

To: Simon Hobson <linux@xxxxxxxxxxxxxxxx>
Subject: [Xen-users] RE: OT: Staging startups for dependent machines
From: Liwei <xieliwei@xxxxxxxxx>
Date: Fri, 26 Aug 2011 00:52:17 +0800
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 25 Aug 2011 09:53:49 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:cc:content-type; bh=3fH7e/mCTruTuSNfIuwfmgiml944Mfx80GAUi7NK8CQ=; b=WLMzDeBLll41oCe29MZaa7ewjjEo4JpK2EAEvvo/Lgz2c8HgLBUb9JChtA3OVSV0ZV tEAyaJ2DM9/uq6z29txy6FoPpm2z/FbVfE0KQ7ElwFf2aKR0uyJHU8Tul0/YpE0w56Zw aQ8VecQLLMjxot2ZnQclVAvTSLRvK05vgjA8w=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
> ------------------------------------------------------
> Date: Thu, 25 Aug 2011 11:46:48 +0100
> From: Simon Hobson <linux@xxxxxxxxxxxxxxxx>
> Subject: [Xen-users] OT: Staging startups for dependent machines
> To: Xen-users@xxxxxxxxxxxxxxxxxxx
> Message-ID: <p0624083dca7bd6c91fab@xxxxxxxxxxxxxxxxxxxxxx>
> Content-Type: text/plain; charset="us-ascii" ; format="flowed"
>
> It's a bit OT for this list, but I'm sure people here will have dealt with it.

IMO, this shouldn't be OT since its xen management related.

>
> Does anyone have any suggestions for simple methods of staging
> machine (Linux in my case) startups when there are interdependencies
> ? Eg, most of my servers rely on the DNS, so it would be nice if they
> could wait till the DNS is running before starting - otherwise I end
> up having to log in and either restart them or restart affected
> services.

I had this exact problem a few months ago deploying a xen install.
Tried looking for a solution online but found nothing much
interesting.

Then I came across this:
http://forums.novell.com/suse/suse-product-discussion-forums/suse-linux-enterprise/suse-linux-enterprise-server-sles/sles-virtualization/343455-how-change-order-automatic-start-virtual-machines-when-power-post1639925.html#post1639925

But it was written for SLES and uses a fixed delay between each VM. So
using my novice knowledge of bash, I came up with the attached init.d
script based off the one linked to above. Basically instead of just
waiting for a fixed delay, a time limit is used instead. The script
will continuously ping an address specified for that VM during this
time limit. If the address comes up, it moves on to the next VM. If it
doesn't, you can configure it to fail or continue with the next VM
anyway. Also, adapted for Debian use.

I'm pretty sure there are some nasty bugs in there (pretty much
hammered it randomly till it worked, and stopped there), so the usual
disclaimer applies.

!!ALSO, do check through the stop part of the script since I wrote
that as a theoretical method to individually stop/save the VMs during
system reboot/shutdown. Didn't really test it much though since I
decided that manually stopping the VMs would be much easier and safer.
It is particularly dangerous since it falls back to just killing the
VMs if all other soft methods fail. So if you're unsure, just
remove/disable the stop part. Or use the older script that I've
attached as well that only does the staggered VM starting.

Hope this will be of help

>
> Or would it be easier to have a site-wide hosts file with key hosts
> in it, and automatically distribute that ?
>
> --
> Simon Hobson
>
> Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
> author Gladys Hobson. Novels - poetry - short stories - ideal as
> Christmas stocking fillers. Some available as e-books.

Attachment: xendomUstart
Description: Binary data

Attachment: xendomUstart.old
Description: Binary data

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] RE: OT: Staging startups for dependent machines, Liwei <=