8b3b1b9096
848123e6-fix-memory-stats-for-shutoff-VM.patch ebcb7c06-fix-exception-when-the-address-is-not-an-IP.patch c4d26d16-fix-VM-polling-on-old-libvirt.patch ac2be796-do-not-throw-exception-if-volume-or-pool-dont-exist.patch 88e18c86-fix-sending-net-removed-signal.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=231
27 lines
1.1 KiB
Diff
27 lines
1.1 KiB
Diff
Subject: domain: Fix memory stats for shutoff VM (bz 1215453)
|
|
From: Cole Robinson crobinso@redhat.com Mon May 4 15:50:01 2015 -0400
|
|
Date: Mon May 4 15:50:01 2015 -0400:
|
|
Git: 848123e6c8850bafad28767a165bbbf8dc746a09
|
|
|
|
memory doesn't have a separate input/output stats, so we shouldn't use
|
|
the in_out_vector_helper. This resulted in shutoff VMs appearing to still
|
|
use memory in the manager window.
|
|
|
|
diff --git a/virtManager/domain.py b/virtManager/domain.py
|
|
index cdb8cd5..e96b80f 100644
|
|
--- a/virtManager/domain.py
|
|
+++ b/virtManager/domain.py
|
|
@@ -1699,8 +1699,10 @@ class vmmDomain(vmmLibvirtObject):
|
|
cpudata = cpudata[0:limit]
|
|
return cpudata
|
|
def memory_usage_vector_limit(self, limit):
|
|
- return self.in_out_vector_limit(self.stats_memory_vector(),
|
|
- limit)
|
|
+ data = self.stats_memory_vector()
|
|
+ if len(data) > limit:
|
|
+ data = data[0:limit]
|
|
+ return data
|
|
def network_traffic_vector_limit(self, limit, ceil=None):
|
|
return self.in_out_vector_limit(self.network_traffic_vector(ceil),
|
|
limit)
|