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] Many same managed domain

To: "Daniel P. Berrange" <berrange@xxxxxxxxxx>, Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Many same managed domain
From: Mats Petersson <mats@xxxxxxxxxxxxxxxxx>
Date: Sun, 22 Jul 2007 23:20:54 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 24 Jul 2007 09:01:08 -0700
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:x-mailer:date:to:from:subject:cc:in-reply-to:references:mime-version:content-type:sender:message-id; b=R1dzb83IHC9BmKUhpc0wZ5ZuwJpueCTF5T/ACORccMZmhoWGfw3Os8MozQOrU5U6e30CoPKqCs5K2ljcbarFdKlIA+codKdLcBL4nK5kFklQfRbL9Xc/S/Rv5OIWo8YYpdyUeSgOIcPQ4gVtiXmlEmf7Ay/MdALGJdpVcPlodxc=
Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:x-mailer:date:to:from:subject:cc:in-reply-to:references:mime-version:content-type:sender:message-id; b=jEMsnO3/0AoN8Lv4bNc5oJzqyR1qTCspzDko6OJSrf5F/O/pOXTTRVwQddZZWmFdRo7g7NYZ3coTMhKPK5836pCiFzBHdleZlkV17c8G50Vl/W1neNo2hqmCyLQL3WiCyw+//Hk9YuUdMAJl4Je/gth8up5Fl670lQj5zGnDOiE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070722144609.GA22043@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: <91C7CC1E6AF558kanno.masaki@xxxxxxxxxxxxxx> <20070722144609.GA22043@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
At 15:46 22/07/2007, Daniel P. Berrange wrote:
On Sun, Jul 22, 2007 at 02:09:01PM +0900, Masaki Kanno wrote:
> Hi,
>
> When I tested xm new command without uuid parameter repeatedly,
> I saw many same managed domain as follows.
>
> # xm list
> Name ID Mem VCPUs State Time(s) > Domain-0 0 941 2 r----- 51.9
> # xm new /xen/vm1.conf
> Using config file "/xen/vm1.conf".
> # xm new /xen/vm1.conf
> Using config file "/xen/vm1.conf".
> # xm new /xen/vm1.conf
> Using config file "/xen/vm1.conf".
> # xm list
> Name ID Mem VCPUs State Time(s) > Domain-0 0 941 2 r----- 56.3 > vm1 256 1 0.0 > vm1 256 1 0.0 > vm1 256 1 0.0
>
>
> But, when I tested xm new command with uuid parameter repeatedly,
> I did not see same managed domain as follows.
>
> # xm list
> Name ID Mem VCPUs State Time(s) > Domain-0 0 941 2 r----- 69.9
> # xm new /xen/vm1.conf uuid="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
> Using config file "/xen/vm1.conf".
> # xm new /xen/vm1.conf uuid="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
> Using config file "/xen/vm1.conf".
> # xm new /xen/vm1.conf uuid="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
> Using config file "/xen/vm1.conf".
> # xm list
> Name ID Mem VCPUs State Time(s) > Domain-0 0 941 2 r----- 74.4 > vm1 256 1 0.0
>
>
> I think that xm new command should cause a command error if without
> uuid parameter.  What do you think?

No that would break backwards compatability for user who rely on Xen
autogenerating the UUID.

In order to maintain back-compatability with existing use cases, the user
needs to be able to update the existing VM config with 'xm new' if the name
or UUID match, while preventing multiple VMs with same name. So the the rules
when defining a new VM need to follow this logic

  - If the UUID is not specified
        - If a VM with same name exists
            => Update the config for that existing VM
        - Else no vm with same name exists
            => Define a brand new VM with auto-generated UUID
  - Else UUID is specified
        - If a VM with same UUID exists
              - If name is different
                    => Error
              - Else if name is same
                    => Update the config for that existing VM
       - Else no VM with same UUID exists
            => Define a branch new VM with that name

Depending on where in the XenD code you put this error checking you may need
some extra special case rules handle stuff like localhost migration.

With live migration/save&restore, you shouldn't need to worry about the name [1], but obviously, the UUID should be the same for the new and old migrated domain, and live migration should be allowed to "localhost".

[1] Part of "xm save/migrate" is to prepend "migrating" to the name of the domain, so there should be no name conflict with live migration when the new domain is created.

--
Mats


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


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