Change in vdsm[ovirt-3.5]: Handle empty QoS section with no cpu limit information

msivak at redhat.com msivak at redhat.com
Fri Dec 11 16:43:54 UTC 2015


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 <msivak at 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 <msivak at redhat.com>


More information about the vdsm-patches mailing list