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: Fix name uniqueness check

To: "Daniel P. Berrange" <berrange@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] PATCH: Fix name uniqueness check
From: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Date: Fri, 28 Sep 2007 12:59:27 +0900
Delivery-date: Thu, 27 Sep 2007 21:00:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070927165051.GK17433@xxxxxxxxxx>
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: <20070927165051.GK17433@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

I tested xen-unstable 15967 and staging 15973.

[xm create]
 if an UUID is specified:
     if a VM with same name exists:
         if the VM is same UUID too:
             ==> xm create succeed, but...
             # xm list
             Name     ID   Mem VCPUs      State   Time(s)
             Domain-0  0   491     2     r-----    109.3
             vm1       2   256     1     r-----   3636.3
             vm1       4   256     1     --p---      0.0
             
         else:
             ==> xm create failed
             Error: VM name 'vm1' already exists as domain 2
             
     else:
         if a VM with same UUID exists:
             ==> xm create succeed... Right?
             
         else:
             ==> xm create succeed
             
 else:
     if a VM with same name exists:
         ==> xm create failed
         Error: VM name 'vm1' already exists as domain 2
         
     else:
         ==> xm create succeed
         

[xm new]
 if an UUID is specified:
     if a VM with same name exists:
         if the VM is same UUID too:
             ==> xm new failed?  but an error message was not shown.
             # xm new /xen/vm2.conf name="vm1"
             Using config file "/xen/vm2.conf".
             # xm list
             Name     ID   Mem VCPUs      State   Time(s)
             Domain-0  0   491     2     r-----    243.9
             vm1       2   256     1     r-----  10003.1
             
         else:
             ==> xm new failed
             Error: Domain name 'vm1' is already used.
             
     else:
         if a VM with same UUID exists:
             ==> xm new failed
             Error: Domain UUID '3ef95bbe-57a9-1caf-9a15-27ab27eb66b3' 
                    is already used.
         else:
             ==> xm new succeed
             
 else:
     if a VM with same name exists:
         ==> xm new failed?  but an error message was not shown.
         
     else:
         ==> xm new succeed
         

Best regards,
 Kan

Thu, 27 Sep 2007 17:50:51 +0100, "Daniel P. Berrange" wrote:

>Changeset  15124:f5459c358575 altered check_name() in XendDomainInfo so that
>it compares domain IDs instead of UUIDs. This breaks a number of things
>
> - You can no longer use 'xm new' to define a persistent config file for
>   a running guest. This breaks the key OS provisioning scenario where
>   you boot a kenrel+initrd for the installer, and at the same time define
>   a permanent config with pygrub.
>
> - It lets you define multiple inactive guests with different UUIDs, but  
>   the same name because all inactive guests have a domid of None. So you
>   can now end up with multiple guests with same name, which is contrary
>   to the goal implied by the patch which was name uniqueness.
>
>It is unclear from the original commit logs just what scenario it was trying
>to protect against, but the original checking of uniqueness based on UUID 
>was correct & is what was used in previous releases XenD.
>
>Thus the attached patch reverts 15124
>
>   Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
>
>Regards,
>Dan.
>-- 
>|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
>|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
>|=-               Projects: http://freshmeat.net/~danielpb/               -=|
>|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -
>|=| 
>
>-------------------------------text/plain-------------------------------
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@xxxxxxxxxxxxxxxxxxx
>http://lists.xensource.com/xen-devel

----
菅野 大樹/Masaki Kanno,TEL 055-924-7349(7551-5366),富士通(株)沼津工場B4F
サーバ本)Linux技術開発統括部 kanno.masaki@xxxxxxxxxxxxxx


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