From: Christian Limpach <christian.limpach@gmail.com>
To: Dan Smith <danms@us.ibm.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH] Prevent xend from starting duplicate domains
Date: Sat, 17 Sep 2005 00:47:45 +0100 [thread overview]
Message-ID: <3d8eece205091616475b814c24@mail.gmail.com> (raw)
In-Reply-To: <87hdckhbme.fsf@us.ibm.com>
On 9/16/05, Dan Smith <danms@us.ibm.com> wrote:
> CL> We should fix that check instead of adding another check.
>
> I agree that there should be one check, but it seems counter-intuitive
> (to me) to have that check where it is. That's the reason I hadn't
> noticed it before.
>
> It seems strange to have a container class (XendDomain) that
> instantiates an item object which then gets an instance of the
> container to check for another domain with the same name. Why not
> have the container itself do the duplicate check? I would argue that
> the existing model is bad because the item class could not be placed
> in another container. Further, the container is enforced as a set by
> the items that go in it, instead of the container itself.
>
> If others agree, I'd be happy to submit a patch that moves the check
> out of the item class and into the container class.
I agree, go for it. You'll have to check both in the create and
restore cases. I don't think we need to check on recreate, we can
assume a consistent store...
> CL> Could you try the attached patch which removes the check if a
> CL> domain "is terminated" and thus allows creation of a domain with
> CL> the same name?
>
> I did test the patch and it does prevent corruption of the list.
I'm happy with removing the check, but I wonder if we're not masking
the fact that we set the domain to terminated state when it's not yet
in that state. Yeah, looks like we should only set the state to
terminated once we've completed device cleanup.
Of course we must have some other bug which you hit when we have
domains in terminated state and you want to create a new domain of the
same name. Maybe renaming the domain when we set the terminated state
is the solution for that...
christian
next prev parent reply other threads:[~2005-09-16 23:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-13 21:46 [PATCH] Prevent xend from starting duplicate domains Dan Smith
2005-09-13 23:20 ` David Hopwood
2005-09-14 0:06 ` Dan Smith
2005-09-14 4:32 ` Anthony Liguori
2005-09-16 19:40 ` Christian Limpach
2005-09-16 22:49 ` Dan Smith
2005-09-16 23:47 ` Christian Limpach [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-09-14 12:04 Ian Pratt
2005-09-14 13:36 ` Dan Smith
2005-09-14 17:15 ` Christian Limpach
2005-09-14 20:50 Ian Pratt
2005-09-14 21:03 ` Dan Smith
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=3d8eece205091616475b814c24@mail.gmail.com \
--to=christian.limpach@gmail.com \
--cc=Christian.Limpach@cl.cam.ac.uk \
--cc=danms@us.ibm.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.