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-devel

Re: [Xen-devel] [PATCH] Prevent xend from starting duplicate domains

To: Christian.Limpach@xxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH] Prevent xend from starting duplicate domains
From: Dan Smith <danms@xxxxxxxxxx>
Date: Fri, 16 Sep 2005 15:49:13 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 16 Sep 2005 22:47:03 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <87d5ncsksl.fsf@xxxxxxxxxx> <3d8eece205091612407ddf69a9@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux)
CL> There is already a check for domains with the same name in
CL> XendDomainInfo.check_name.

Ah, yes, I see that now.

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.

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.

-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms@xxxxxxxxxx


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel