Change in vdsm[master]: vm: use getVmPolicy for sampling

vfeenstr at redhat.com vfeenstr at redhat.com
Wed Sep 24 06:30:51 UTC 2014


Vinzenz Feenstra has posted comments on this change.

Change subject: vm: use getVmPolicy for sampling
......................................................................


Patch Set 3: Code-Review-1

(2 comments)

http://gerrit.ovirt.org/#/c/29932/3/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 311: 
Line 312:         try:
Line 313:             if VmStatsThread._libvirt_metadata_supported:
Line 314:                 qos = self._vm.getVmPolicy()
Line 315:         except libvirt.libvirtError as e:
This can never happen anymore since you swallow all the libvirtError exceptions in  getVmPolicy

If this is the case then _libvirt_metadata_supported will never be set to False, which means it will be tried to be retrieved everytime anyway
Line 316:             if e.get_error_code() == libvirt.VIR_ERR_ARGUMENT_UNSUPPORTED:
Line 317:                 VmStatsThread._libvirt_metadata_supported = False
Line 318:                 self._log.error("libvirt does not support metadata")
Line 319: 


Line 318:                 self._log.error("libvirt does not support metadata")
Line 319: 
Line 320:         if qos:
Line 321:             nodeList = qos.getElementsByTagName('vcpulimit')
Line 322:             infos['vcpuLimit'] = nodeList[0].childNodes[0].data
even it used to be already like this, however this would throw an IndexError if the qos element is empty. We should at least check that this doesn't matter.
Line 323: 
Line 324:         return infos
Line 325: 
Line 326:     def _getIoTuneStats(self, stats):


-- 
To view, visit http://gerrit.ovirt.org/29932
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie73d7b2200e6fb6d25552e2668b96670c5b87b13
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list