From: Dan Smith <danms@us.ibm.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] Prevent xend from starting duplicate domains
Date: Tue, 13 Sep 2005 14:46:34 -0700 [thread overview]
Message-ID: <87d5ncsksl.fsf@us.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 398 bytes --]
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@us.ibm.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: xend-dup.patch --]
[-- Type: text/x-patch, Size: 691 bytes --]
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
[-- Attachment #3: Type: text/plain, Size: 88 bytes --]
--
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms@us.ibm.com
[-- Attachment #4: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2005-09-13 21:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-13 21:46 Dan Smith [this message]
2005-09-13 23:20 ` [PATCH] Prevent xend from starting duplicate domains David Hopwood
2005-09-14 0:06 ` Dan Smith
2005-09-14 4:32 ` Anthony Liguori
2005-09-16 19:40 ` Christian Limpach
2005-09-16 22:49 ` Dan Smith
2005-09-16 23:47 ` Christian Limpach
-- strict thread matches above, loose matches on Subject: below --
2005-09-14 12:04 Ian Pratt
2005-09-14 13:36 ` Dan Smith
2005-09-14 17:15 ` Christian Limpach
2005-09-14 20:50 Ian Pratt
2005-09-14 21:03 ` Dan Smith
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=87d5ncsksl.fsf@us.ibm.com \
--to=danms@us.ibm.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.