All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Fehlig <jfehlig@novell.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: xen-devel@lists.xensource.com, Zhigang Wang <zhigang.x.wang@oracle.com>
Subject: Re: [PATCH] [RFC] Add lock on domain start
Date: Mon, 11 Aug 2008 10:45:23 -0600	[thread overview]
Message-ID: <48A06CA3.2080801@novell.com> (raw)
In-Reply-To: <18592.7953.353263.676403@mariner.uk.xensource.com>

Ian Jackson wrote:
> Jim Fehlig writes ("[Xen-devel] [PATCH] [RFC] Add lock on domain start"):
>   
>> This patch adds a simple lock mechanism when starting domains by placing 
>> a lock file in xend-domains-path/<dom_uuid>.  The lock file is removed 
>> when domain is stopped.  The motivation for such a mechanism is to 
>> prevent starting the same domain from multiple hosts.
>>     
>
> I think this should be dealt with in your next-layer-up management
> tools.
>   

Perhaps.  I wanted to see if there was any interest in having such a
feature at the xend layer.  If not, I will no longer pursue this option.

> Lockfiles are bad because they can become stale.
>   

Yep.  Originally I considered a 'lockless-lock' approach where a bit it
set and counter is spun on a 'reserved' sector of vbd, e.g. first
sector.  Attempting to attach the vbd to another domain would fail if
lock bit is set and counter is incrementing.  If counter is not
incrementing assume lock is stale and proceed.  This approach is
certainly more complex.  We support various image formats (raw, qcow,
vmdk, ...) and such an approach may mean changing the format (e.g.
qcow3).  Wouldn't work for existing images.  Who is responsible for
spinning the counter?  Anyhow seemed like a lot of complexity as
compared to the suggested simple approach with override for stale lock.

Thanks,
Jim

  reply	other threads:[~2008-08-11 16:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-06  6:06 [PATCH] [RFC] Add lock on domain start Jim Fehlig
2008-08-07  2:23 ` Zhigang Wang
2008-08-07  4:26   ` Zhigang Wang
2008-08-08 17:07     ` Jim Fehlig
2008-08-11  2:22       ` Zhigang Wang
2008-08-11 11:14 ` Ian Jackson
2008-08-11 16:45   ` Jim Fehlig [this message]
2009-08-05  7:41     ` Pasi Kärkkäinen
2009-08-05  8:39       ` Zhigang Wang
2009-08-05  9:33         ` Pasi Kärkkäinen
2009-08-05 16:30           ` Jia Ju Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48A06CA3.2080801@novell.com \
    --to=jfehlig@novell.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=zhigang.x.wang@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.