From: Jim Fehlig <jfehlig@novell.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] Fix destruction of VMMetrics objects for managed domains
Date: Tue, 15 Jul 2008 12:22:28 -0600 [thread overview]
Message-ID: <487CEAE4.3030405@novell.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 814 bytes --]
While plugging a xend memory lead (c/s 18030), I introduced a bug in the
case of managed domains. Managed domains continue to exist after
shutdown and thus should not have their associated VMMetrics object
destroyed until deleted.
The bug actually manifested by a new -> start -> shutdown -> delete
sequence of operations. Shutdown destroyed the VMMetrics object and
delete tried to do the same :-):
xen65:~/jim # xm del opensuse-10.3
Error: ('fa5160c0-bc7a-1459-974b-d3e023c717dd', 'VM_metrics')
Usage: xm delete <DomainName>
Initially, I was simply going to clean up exception handling but decided
to go with the attached hack (*cough* ..., I mean patch) since users may
be interested in VMMetrics even when the vm is powered-off.
Regards,
Jim
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
[-- Attachment #2: xend-vmmetrics-delete.patch --]
[-- Type: text/x-patch, Size: 573 bytes --]
diff -r 750eee596adf tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Tue Jul 15 13:19:26 2008 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py Tue Jul 15 11:59:32 2008 -0600
@@ -2618,7 +2618,9 @@ class XendDomainInfo:
def _cleanupVm(self):
"""Cleanup VM resources. Idempotent. Nothrow guarantee."""
- self.metrics.destroy()
+ from xen.xend import XendDomain
+ if not XendDomain.instance().is_domain_managed(self):
+ self.metrics.destroy()
self._unwatchVm()
try:
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2008-07-15 18:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=487CEAE4.3030405@novell.com \
--to=jfehlig@novell.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.