All of lore.kernel.org
 help / color / mirror / Atom feed
* PATCH: Fix name  uniqueness check
@ 2007-09-27 16:50 Daniel P. Berrange
  2007-09-27 17:16 ` Jim Fehlig
  2007-09-28  3:59 ` Masaki Kanno
  0 siblings, 2 replies; 16+ messages in thread
From: Daniel P. Berrange @ 2007-09-27 16:50 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 1332 bytes --]

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@redhat.com>

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

[-- Attachment #2: xen-name-check.patch --]
[-- Type: text/plain, Size: 738 bytes --]

diff -rup xen-3.1-testing.hg/tools/python/xen/xend/XendDomainInfo.py xen-3.1-testing-15432/tools/python/xen/xend/XendDomainInfo.py
--- xen-3.1-testing.hg/tools/python/xen/xend/XendDomainInfo.py	2007-09-27 11:54:38.000000000 -0400
+++ xen-3.1-testing-15432/tools/python/xen/xend/XendDomainInfo.py	2007-09-27 12:43:20.000000000 -0400
@@ -2150,7 +2150,7 @@ class XendDomainInfo:
             raise VmError('Invalid VM Name')
 
         dom =  XendDomain.instance().domain_lookup_nr(name)
-        if dom and dom.domid != self.domid:
+        if dom and dom.info['uuid'] != self.info['uuid']:
             raise VmError("VM name '%s' already exists%s" %
                           (name,
                            dom.domid is not None and

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2007-10-05 14:26 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-27 16:50 PATCH: Fix name uniqueness check Daniel P. Berrange
2007-09-27 17:16 ` Jim Fehlig
2007-09-27 17:39   ` Daniel P. Berrange
2007-09-27 19:42     ` Jim Fehlig
2007-09-27 20:40       ` Daniel P. Berrange
2007-10-01  5:36         ` Keir Fraser
2007-10-01 13:57           ` Daniel P. Berrange
2007-10-01 18:18             ` Daniel P. Berrange
2007-10-01 22:12               ` Daniel P. Berrange
2007-10-02 13:11                 ` Masaki Kanno
2007-10-02 14:47                   ` Daniel P. Berrange
2007-10-05  5:19                     ` Masaki Kanno
2007-10-05 13:35                       ` Daniel P. Berrange
2007-10-05 14:26                         ` Masaki Kanno
2007-09-28  3:59 ` Masaki Kanno
2007-09-28  4:56   ` Masaki Kanno

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.