Change in vdsm[master]: add verb for vdsm to tuneCpu params

lvroyce at linux.vnet.ibm.com lvroyce at linux.vnet.ibm.com
Sun Sep 23 01:49:44 UTC 2012


Royce Lv has posted comments on this change.

Change subject: add verb for vdsm to tuneCpu params
......................................................................


Patch Set 6: (4 inline comments)

....................................................
File vdsm_cli/vdsClient.py
Line 210:         if len(args) > 1:
Line 211:             for param in args[1:]:
Line 212:                 if '=' in param:
Line 213:                     key, value = param.split("=", 1)
Line 214:                     params[key] = value
Done
Line 215:         return self.ExecAndExit(self.s.tuneCpu(params))
Line 216: 
Line 217:     def hotplugNic(self, args):
Line 218:         nic = self._parseDriveSpec(args[1])


....................................................
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
Done
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]
That's a good idea, thanks, Mark
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:
A piece of unclean code left by v1, thanks!
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 at linux.vnet.ibm.com>
Gerrit-Reviewer: Adam Litke <agl at us.ibm.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck at redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhornyak at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Royce Lv <lvroyce at linux.vnet.ibm.com>
Gerrit-Reviewer: Ryan Harper <ryanh at us.ibm.com>
Gerrit-Reviewer: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
Gerrit-Reviewer: Zhu Bo <bozhu at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list