aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKeir Fraser <keir@xensource.com>2007-09-27 18:08:11 +0100
committerKeir Fraser <keir@xensource.com>2007-09-27 18:08:11 +0100
commit9f5581fda701ef44f339bda7462907de5e85ede8 (patch)
tree200b2799c7bc145815e7dbaf6ba4ab5a33b51ee0 /tools
parentcd76c0a1edd26aed8ad9bdb8144b20e0b335cea2 (diff)
downloadxen-9f5581fda701ef44f339bda7462907de5e85ede8.tar.gz
xen-9f5581fda701ef44f339bda7462907de5e85ede8.tar.bz2
xen-9f5581fda701ef44f339bda7462907de5e85ede8.zip
xend: Fix name uniqueness check (revert 15168:a717cb2fac90).
Changeset 15168:a717cb2fac90 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. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/python/xen/xend/XendDomainInfo.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py
index 73ae50bffb..6de4b2ff54 100644
--- a/tools/python/xen/xend/XendDomainInfo.py
+++ b/tools/python/xen/xend/XendDomainInfo.py
@@ -2184,7 +2184,7 @@ class XendDomainInfo:
raise VmError('Invalid VM Name')
dom = XendDomain.instance().domain_lookup_nr(name)
- if dom and dom.domid 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