Mark Wu has posted comments on this change.
Change subject: add verb for vdsm to tuneCpu params
......................................................................
Patch Set 6: I would prefer that you didn't submit this
(3 inline comments)
....................................................
File vdsm/libvirtvm.py
Line 1322: self.conf['pauseCode'] = self._initTimePauseCode
Line 1323: if self._initTimePauseCode == 'ENOSPC':
Line 1324: self.cont()
Line 1325: self.conf['pid'] = self._getPid()
Line 1326: #do not trying to change cpu_shares for recovery and restore flows
# do not try to change cpu_shares for recovery and restore flows
Line 1327: if not 'recover' in self.conf and not 'restoreState' in
self.conf:
Line 1328: nice = int(self.conf.get('nice', '0'))
Line 1329: nice = max(min(nice, 19), 0)
Line 1330: cpuShare = (20 - nice) * 51
Line 1894: def tuneCpu(self, tuneParams):
Line 1895: try:
Line 1896: self._dom.setSchedulerParameters(tuneParams)
Line 1897: for param in tuneParams:
Line 1898: self.conf[param] = tuneParams[param]
How about putting the parameters into a new dict, not the top-level dict, like this:
self.conf['cpuTune'][param] = tuneParams[param]
Line 1899: self.saveState()
Line 1900: return {'status': doneCode}
Line 1901: except libvirt.libvirtError, e:
Line 1902: self.log.error("TuneCpu failed:%s",
Line 1901: except libvirt.libvirtError, e:
Line 1902: self.log.error("TuneCpu failed:%s",
Line 1903: e.message, exc_info=True)
Line 1904: return errCode['tunecpuErr']
Line 1905: except LookupError:
Which code raise LookupError?
Line 1906: self.log.error('TuneCpu failed: unrecongnized params',
Line 1907: exc_info=True)
Line 1908: return errCode['tunecpuErr']
Line 1909:
--
To view, visit
http://gerrit.ovirt.org/7492
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I09e02e09ef06ad6de45be75c3f2f913a3025750f
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Adam Litke <agl(a)us.ibm.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck(a)redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhornyak(a)redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Ryan Harper <ryanh(a)us.ibm.com>
Gerrit-Reviewer: Zhu Bo <bozhu(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server