[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] Prevent xend from starting duplicate domains
The attached patch puts a simple check in domain_create() which prevents starting a domain if there is already one of the same name in the domain list. This fixes the problem of getting the following error message from xm while creating a domain soon after destroying one with the same name: xen.xend.XendProtocol.XendError: (3, 'No such process') Signed-off-by: Dan Smith <danms@xxxxxxxxxx> diff -r 3a34bcb7c28b tools/python/xen/xend/XendDomain.py --- a/tools/python/xen/xend/XendDomain.py Tue Sep 13 19:09:44 2005 +++ b/tools/python/xen/xend/XendDomain.py Tue Sep 13 13:25:08 2005 @@ -296,6 +296,13 @@ @param config: configuration @return: domain """ + + existing = self.domains.get_by_name(sxp.child_value(config, "name")) + if existing: + log.debug("Attempt to create duplicate domain %s" % existing.name) + raise XendError("Domain %s already exists as %i!" % + (existing.name, existing.id)) + dominfo = XendDomainInfo.create(self.dbmap, config) return dominfo -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms@xxxxxxxxxx _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |