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

Fri, 5 Oct 2007 14:35:16 +0100, "Daniel P. Berrange" wrote:

>On Fri, Oct 05, 2007 at 02:19:16PM +0900, Masaki Kanno wrote:
>> Tue, 2 Oct 2007 15:47:12 +0100, "Daniel P. Berrange" wrote:
>> 
>> >On Tue, Oct 02, 2007 at 10:11:01PM +0900, Masaki Kanno wrote:
>> >> Hi Dan,
>> >> 
>> >> Thanks for your effort and your patch. 
>> >> I think that the allow/reject rules are wonderful.  But, I have a few 
>> >> comments. 
>> >> 
>> >> 
>> >> I agree the rule of the following case. 
>> >> But, the behavior is (redefine+rename+create), isn't it?
>> >
>> >Yes, that is actually what it ends up doing, replacing the config for the 
>> >matching UUID causes a rename.
>> >
>> >> When I tested the following case, the result was as follows. 
>> >> I think that we should reject xm new command if same UUID vm is active. 
>> >
>> >I hadn't noticed that, but its easy to special case this particular
>> >case / scenario to be rejected. Or we could fix it to correctly rename
>> >the existing running VM which might be more user friendly. 
>> >
>> >Either option is a small add-on patch to my previous submissions.
>> 
>> Sorry for delay with replies to your message. 
>> 
>> I am worried about changing the configuration of existing running VM. 
>> But, my worry is vague, and does not have great grounds. 
>> If UUID is same, maybe we will become possible to change the name of 
>> the VM and all the configuration of the VM by xm new command, I guess. 
>> 
>> If only the config.sxp of the VM is changed by xm new command, and if 
>> the definition of the config.sxp is reflected after xm shutdown command, 
>> my worry will be resolved. 
>
>Kan, give this patch a try which simply updates the name_label field for
>the exsting VM. With this minimal rename it avoids the risk of the same VM
>being started twice as you demonstrated 
>

Hi Dan,

Thank you.  The problem that I found first was resolved. 

# xm create /xen/vm1.conf uuid="11111111-2222-3333-4444-555555555555"
Using config file "/xen/vm1.conf".
Started domain vm1
# xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0   747     2     r-----    389.8
vm1                                          2   256     1     -b----      1.3
# xm new /xen/vm2.conf uuid="11111111-2222-3333-4444-555555555555"
Using config file "/xen/vm2.conf".
# xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0   747     2     r-----    392.5
vm2                                          2   256     1     ------     18.2


But, I found another problem...  When I rebooted the VM, the name of the VM 
was restored to 'vm1'.  Could you fix the problem too? 

# xm new /xen/vm1.conf uuid="11111111-2222-3333-4444-555555555555"
Using config file "/xen/vm1.conf".
# xm start vm1
# xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0   747     2     r-----    410.3
vm1                                          3   256     1     -b----     26.2
# xm new /xen/vm2.conf uuid="11111111-2222-3333-4444-555555555555"
Using config file "/xen/vm2.conf".
# xm reboot vm2
# xm list 
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0   747     2     r-----    420.4
vm1                                          4   256     1     -b----     25.8


Best regards,
 Kan



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

<Prev in Thread] Current Thread [Next in Thread>