- Upstream bug fix (bsc#1027942)

4c7c4590-manager-Fix-mem-disk-net-stats-graphs.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=408
This commit is contained in:
Charles Arnold 2018-02-09 22:41:17 +00:00 committed by Git OBS Bridge
parent c085d819a8
commit 0fac659b2f
3 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,42 @@
Subject: manager: Fix mem, disk, net stats graphs (bz 1543896)
From: Cole Robinson crobinso@redhat.com Fri Feb 9 14:02:04 2018 -0500
Date: Fri Feb 9 14:02:04 2018 -0500:
Git: 4c7c45908f6afd4e0edae9923218472d353caa3a
python2/3 division compat messed this up
https://bugzilla.redhat.com/show_bug.cgi?id=1543896
diff --git a/virtManager/domain.py b/virtManager/domain.py
index ed94cf1..6d3dac2 100644
--- a/virtManager/domain.py
+++ b/virtManager/domain.py
@@ -1984,7 +1984,7 @@ class vmmDomain(vmmLibvirtObject):
except libvirt.libvirtError as err:
logging.error("Error reading mem stats: %s", err)
- pcentCurrMem = (curmem // float(totalmem)) * 100
+ pcentCurrMem = (curmem / float(totalmem)) * 100
pcentCurrMem = max(0.0, min(pcentCurrMem, 100.0))
return pcentCurrMem, curmem
diff --git a/virtManager/manager.py b/virtManager/manager.py
index d6640fb..d38fc4e 100644
--- a/virtManager/manager.py
+++ b/virtManager/manager.py
@@ -1068,7 +1068,7 @@ class vmmManager(vmmGObjectUI):
return
d1, d2 = obj.disk_io_vectors(GRAPH_LEN, self.max_disk_rate)
- data = [(x + y) // 2 for x, y in zip(d1, d2)]
+ data = [(x + y) / 2 for x, y in zip(d1, d2)]
cell.set_property('data_array', data)
def network_traffic_img(self, column_ignore, cell, model, _iter, data):
@@ -1077,5 +1077,5 @@ class vmmManager(vmmGObjectUI):
return
d1, d2 = obj.network_traffic_vectors(GRAPH_LEN, self.max_net_rate)
- data = [(x + y) // 2 for x, y in zip(d1, d2)]
+ data = [(x + y) / 2 for x, y in zip(d1, d2)]
cell.set_property('data_array', data)

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Feb 9 15:39:31 MST 2018 - carnold@suse.com
- Upstream bug fix (bsc#1027942)
4c7c4590-manager-Fix-mem-disk-net-stats-graphs.patch
-------------------------------------------------------------------
Wed Feb 7 08:58:09 MST 2018 - carnold@suse.com

View File

@ -38,6 +38,7 @@ Source1: virt-install.rb
Source2: virt-install.desktop
Source3: virt-manager-supportconfig
# Upstream Patches
Patch0: 4c7c4590-manager-Fix-mem-disk-net-stats-graphs.patch
# SUSE Only
Patch70: virtman-desktop.patch
Patch71: virtman-kvm.patch
@ -176,6 +177,7 @@ machine).
%prep
%setup -q
# Upstream Patches
%patch0 -p1
# SUSE Only
%patch70 -p1
%patch71 -p1