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/
Home Products Support Community News


Re: [Xen-users] lockfile?

To: Tomoki Taniguchi <tomoki.taniguchi@xxxxxxxxx>
Subject: Re: [Xen-users] lockfile?
From: Christian Horn <chorn@xxxxxxxxxxxx>
Date: Wed, 10 Oct 2007 08:39:02 +0200
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 09 Oct 2007 23:40:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <718828c0710092330h32afccf1r8f8ee5c1109e6006@xxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <718828c0710092330h32afccf1r8f8ee5c1109e6006@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
On Wed, Oct 10, 2007 at 03:30:01PM +0900, Tomoki Taniguchi wrote:
> is there a locking mechanism in xen
> to prevent 2 xen server from running the same domU config
> located on a shared drive?
As far as i know: no.

> i wish that i you could specify a lock file in the domU config file,
> then xm create configfile
> will check to see if the lockfile specified in the config file exists.
> if it exists, it exits out with an error.
> if it does not exist, it creates the lockfile
> and starts the domU.
> does something similar exits?
There are several projects/attempts.
For our environment here we started to keep it as simple as possible
and implemented a script, and set an alias on 'xm' so the script wraps
every invocation of xm. Then all 'create' calls are catched by the
script, it gets from /etc/hosts the names of all dom0s in that xen-site
and checks via ssh-pubkey-auth if the new domU is already running there.

This is not perfect, if we come into so heavy use (so many domU-creations)
that this ssh-checking makes trouble a lock in a database (ldap?) is
probably better.
An other idea is to try to get locks on the disk-files of domUs, i
read if that is cluster-lvm that does locking, the evms we are using
does not.


Xen-users mailing list

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