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

Hi,

Next, I tested xen-unstable 15967 without staging 15973.
I think that new problems occur by staging 15973.  I will investigate 
causes to solve new problems.

[xm create]
 if an UUID is specified:
     if a VM with same name exists:
         if the VM is same UUID too:
             ==> xm create failed
             Error: VM name 'vm1' already exists as domain 1
             
         else:
             ==> xm create failed
             Error: VM name 'vm1' already exists as domain 1
             
     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 1
         
     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
             Error: VM name 'vm1' already exists as domain 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 '191a8164-aaff-c9fe-63b4-493eba17021a' 
                    is already used.
         else:
             ==> xm new succeed
             
 else:
     if a VM with same name exists:
         ==> xm new failed
         Error: VM name 'vm1' already exists as domain 1
         
     else:
         ==> xm new succeed
         

Best regards,
 Kan

Fri, 28 Sep 2007 12:59:27 +0900, Masaki Kanno wrote:

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


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