All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mats Petersson <mats@planetcatfish.com>
To: "Daniel P. Berrange" <berrange@redhat.com>,
	Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: Many same managed domain
Date: Sun, 22 Jul 2007 23:20:54 +0100	[thread overview]
Message-ID: <46a3d86b.2015300a.555f.38d1@mx.google.com> (raw)
In-Reply-To: <20070722144609.GA22043@redhat.com>

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@lists.xensource.com
>http://lists.xensource.com/xen-devel

  reply	other threads:[~2007-07-22 22:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-22  5:09 Many same managed domain Masaki Kanno
2007-07-22 10:30 ` Mats Petersson
2007-07-24  2:36   ` Masaki Kanno
2007-07-22 14:46 ` Daniel P. Berrange
2007-07-22 22:20   ` Mats Petersson [this message]
2007-07-24  3:12   ` Masaki Kanno
2007-07-24 13:25     ` Daniel Berrange
2007-07-24 14:47       ` Masaki Kanno
     [not found]   ` <9BC7CDA074E023kanno.masaki@jp.fujitsu. com>
2007-07-25  0:16     ` Jim Fehlig
2007-07-25  7:16       ` Masaki Kanno
2007-07-25 13:23       ` Daniel P. Berrange
2007-07-26 17:20       ` Jim Fehlig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46a3d86b.2015300a.555f.38d1@mx.google.com \
    --to=mats@planetcatfish.com \
    --cc=berrange@redhat.com \
    --cc=kanno.masaki@jp.fujitsu.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.