From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: "Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>,
Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: xl create should refuse to share block devices RW between domains
Date: Tue, 27 Jul 2010 09:01:57 -0700 [thread overview]
Message-ID: <4C4F02F5.9050404@goop.org> (raw)
In-Reply-To: <19534.64573.809611.586846@mariner.uk.xensource.com>
On 07/27/2010 08:33 AM, Ian Jackson wrote:
> Jeremy Fitzhardinge writes ("Re: xl create should refuse to share block devices RW between domains"):
>> Well, my specific use case is that I have pairs of domain configs, one
>> PV, one HVM, referring to the same set of resources. I want xl create
>> to catch when I try and create the PV version of a domain while the HVM
>> is still running.
> Mmm. Of course an HVM domain needs to open the underlying device
> twice, once for blktap and once for qemu.
Good point. For stubdoms that's pretty obvious if you consider the
stubdom to be part of the main domain. For dom0-resident qemu it you
need a more subtle check which can match a domain to its corresponding qemu.
>> A more comprehensive check would be nice, but just this would be
>> useful. But whatever it does check should be 100% reliable.
> Well, I guess I meant:
>
> 1. Do we have to catch every possible conflict ? If so then
> your e2fsprogs example is one we need to consider, and we
> will have to add a new kernel feature which can prevent e2fsprogs
> from opening the block device, or simulate "mounting" it or
> something.
>
> 1b. If not, then which conflicts are we trying to detect ?
I think domU vs domU conflicts are the most important, since they can
come about from normal operation of the tools. dom0 vs domU requires
someone doing something non-tools-related.
> 2. If we catch a particular combination (eg, start two domains at
> once using the same storage resources) does our check have to be
> race-free ? That may make it more complicated - and if the answer
> to my first question is "no" there will be some things which are
> inherently racy (eg, spotting mounting a domain's disk
> vs. starting a domain with a disk which is mounted).
Yes, it needs to be race-free. In general I think that specific
invocations of "xl" should be considered atomic operations. For
something like domain creation, it should be able to gather and reserve
all the resources required before actually starting the domain, and if
it can't fail and release everything with a useful message. A test
which can fail in certain racy circumstances is useless.
> NB that when we fix the bug that you can start multiple domains with
> the same name, you'll be able to avoid your PV/HVM accident by
> specifying the same name in each config file.
BTW, that's another bug. xl create doesn't prevent two domains with the
same name from being created...
J
next prev parent reply other threads:[~2010-07-27 16:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-27 0:36 xl create should refuse to share block devices RW between domains Jeremy Fitzhardinge
2010-07-27 8:18 ` Ian Campbell
2010-07-27 10:40 ` Stefano Stabellini
2010-07-27 10:55 ` Ian Campbell
2010-07-27 15:18 ` Jeremy Fitzhardinge
2010-07-27 15:47 ` Ian Campbell
2010-07-27 18:17 ` Daniel Stodden
2010-07-27 15:17 ` Ian Jackson
2010-07-27 15:23 ` Jeremy Fitzhardinge
2010-07-27 15:33 ` Ian Jackson
2010-07-27 15:50 ` Ian Campbell
2010-07-27 16:01 ` Jeremy Fitzhardinge [this message]
2010-07-27 16:07 ` Stefano Stabellini
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=4C4F02F5.9050404@goop.org \
--to=jeremy@goop.org \
--cc=Ian.Jackson@eu.citrix.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=Xen-devel@lists.xensource.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.