mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
xend: Fix destruction of VMMetrics objects for managed domains
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 :-): Signed-off-by: Jim Fehlig <jfehlig@novell.com>
This commit is contained in:
1 parent
bdfd5fc7d1
commit
6ed3833291
1 file changed
+3
-1
@@ -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:
|
||||
|
||||