10933e4552
* added Add-memory-stats-widget-also-to-manager-tree-view.patch * added Base-mem-statistics-on-virDomainMemoryStats-if-avail.patch * added Attempt-empty-path-on-virDomainBlockStats.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=137
46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
From 561e7318d19adaba9ea79f6f3010bc1fe9d37d10 Mon Sep 17 00:00:00 2001
|
|
From: Thorsten Behrens <tbehrens@suse.com>
|
|
Date: Sun, 12 Jan 2014 03:13:54 +0100
|
|
Subject: [PATCH 3/3] Attempt empty path on virDomainBlockStats
|
|
|
|
libvirt for some backends yields summary domain stats for empty
|
|
disk path.
|
|
|
|
Conflicts:
|
|
virtManager/domain.py
|
|
---
|
|
virtManager/domain.py | 13 +++++++++++++
|
|
1 file changed, 13 insertions(+)
|
|
|
|
Index: virt-manager-0.10.0/virtManager/domain.py
|
|
===================================================================
|
|
--- virt-manager-0.10.0.orig/virtManager/domain.py
|
|
+++ virt-manager-0.10.0/virtManager/domain.py
|
|
@@ -196,6 +196,7 @@ class vmmDomain(vmmLibvirtObject):
|
|
self._enable_disk_poll = False
|
|
self._stats_disk_supported = True
|
|
self._stats_disk_skip = []
|
|
+ self._summary_disk_stats_skip = False
|
|
|
|
self.inspection = vmmInspectionData()
|
|
|
|
@@ -1705,6 +1706,18 @@ class vmmDomain(vmmLibvirtObject):
|
|
not self.is_active()):
|
|
return rd, wr
|
|
|
|
+ # attempt to retrieve summary stats for domain
|
|
+ if not self._summary_disk_stats_skip:
|
|
+ try:
|
|
+ io = self._backend.blockStats('')
|
|
+ if io:
|
|
+ rd = io[1]
|
|
+ wr = io[3]
|
|
+ return rd, wr
|
|
+ except libvirt.libvirtError:
|
|
+ self._summary_disk_stats_skip = True
|
|
+
|
|
+ # did not work, iterate over all disks
|
|
for disk in self.get_disk_devices(refresh_if_necc=False):
|
|
dev = disk.target
|
|
if not dev:
|