From Yaniv Bronhaim <ybronhei(a)redhat.com>:
Yaniv Bronhaim has uploaded a new change for review.
Change subject: checking balloonInfo existance in vmstat metrics
......................................................................
checking balloonInfo existance in vmstat metrics
Change-Id: I8677bcf180d17ea2cfde3ee152b4e9bc056263c4
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M lib/vdsm/virt/vmstats.py
1 file changed, 9 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/68407/1
diff --git a/lib/vdsm/virt/vmstats.py b/lib/vdsm/virt/vmstats.py
index 8f64059..0bbad41 100644
--- a/lib/vdsm/virt/vmstats.py
+++ b/lib/vdsm/virt/vmstats.py
@@ -200,14 +200,15 @@
data[prefix + '.cpu.sys'] = stat['cpuSys']
data[prefix + '.cpu.usage'] = stat['cpuUsage']
- data[prefix + '.balloon.max'] = \
- stat['balloonInfo']['balloon_max']
- data[prefix + '.balloon.min'] = \
- stat['balloonInfo']['balloon_min']
- data[prefix + '.balloon.target'] = \
- stat['balloonInfo']['balloon_target']
- data[prefix + '.balloon.cur'] = \
- stat['balloonInfo']['balloon_cur']
+ if 'balloonInfo' in stat:
+ data[prefix + '.balloon.max'] = \
+ stat['balloonInfo']['balloon_max']
+ data[prefix + '.balloon.min'] = \
+ stat['balloonInfo']['balloon_min']
+ data[prefix + '.balloon.target'] = \
+ stat['balloonInfo']['balloon_target']
+ data[prefix + '.balloon.cur'] = \
+ stat['balloonInfo']['balloon_cur']
if 'disks' in stat:
for disk in stat['disks']:
--
To view, visit
https://gerrit.ovirt.org/68407
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8677bcf180d17ea2cfde3ee152b4e9bc056263c4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>