Martin Sivák has uploaded a new change for review.

Change subject: Handle empty QoS section with no cpu limit information
......................................................................

Handle empty QoS section with no cpu limit information

The 3.5 stats collecting code expected the cpu limit to be always
present when the metadata section was detected. The latest metadata
patch breaks the assumption and we have to handle it properly now.

Change-Id: I860d2f92f5d6c2eb28127b4cdd7837eafe80b957
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1219903
Signed-off-by: Martin Sivak <msi...@redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/41/50341/1

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 2576522..7256680 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -390,7 +390,11 @@
             metadataCpuLimitXML = _domParseStr(metadataCpuLimit)
             nodeList = \
                 metadataCpuLimitXML.getElementsByTagName('vcpuLimit')
-            infos['vcpuLimit'] = nodeList[0].childNodes[0].data
+            try:
+                infos['vcpuLimit'] = nodeList[0].childNodes[0].data
+            except IndexError:
+                # No CPU limit defined yet, ignore
+                pass
 
         return infos
 


-- 
To view, visit https://gerrit.ovirt.org/50341
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I860d2f92f5d6c2eb28127b4cdd7837eafe80b957
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Martin Sivák <msi...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to