Change in vdsm[master]: set the # of vcpus for a VM (hot plug/unplug)

rgolan at redhat.com rgolan at redhat.com
Mon Jan 13 11:12:06 UTC 2014


Roy Golan has posted comments on this change.

Change subject: set the # of vcpus for a VM (hot plug/unplug)
......................................................................


Patch Set 26:

(4 comments)

http://gerrit.ovirt.org/#/c/21789/26//COMMIT_MSG
Commit Message:

Line 39: 
Line 40: Tested:
Line 41: * setup: Host RHEL 6.5 and Guest 6.5 qemu-guest-agent installed
Line 42: * able to hot add CPUs. Guest online them immediatly
Line 43: * unplug fails with "Operation not supported: qemu didn't unplug the vCPUs properly"
> Keep lines shorter, please.
Done
Line 44: 
Line 45: Change-Id: Ief35e1d335737cd98d21a5413ac9f8ab9d824c3e
Line 46:    vcpu set as the above mentioned.
Line 47: Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1036492


Line 42: * able to hot add CPUs. Guest online them immediatly
Line 43: * unplug fails with "Operation not supported: qemu didn't unplug the vCPUs properly"
Line 44: 
Line 45: Change-Id: Ief35e1d335737cd98d21a5413ac9f8ab9d824c3e
Line 46:    vcpu set as the above mentioned.
> is this line here in purpose ?
Done
Line 47: Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1036492


http://gerrit.ovirt.org/#/c/21789/26/vdsm/API.py
File vdsm/API.py:

Line 459:     def setNumberOfCpus(self, vmId, numberOfCpus):
Line 460: 
Line 461:         if vmId is None or numberOfCpus is None:
Line 462:             self.log.error(
Line 463:                 'Missing one of required parameters: vmId, numberOfCpus')
> you can print:
Done
Line 464:             return {'status': {'code': errCode['MissParam']['status']['code'],
Line 465:                                'message': 'Missing one of required '
Line 466:                                           'parameters: vmId, numberOfCpus'}}
Line 467:         try:


Line 469:         except KeyError:
Line 470:             self.log.warning("vm %s doesn't exist", self._UUID)
Line 471:             return errCode['noVM']
Line 472: 
Line 473:         return curVm.setNumberOfCpus(int(numberOfCpus))
> if numberOfCpus is not valid integer you'll get here ValueError that you do
I think its very reasonable to let it blow in the face of a careless client.
Line 474: 
Line 475:     def migrate(self, params):
Line 476:         """
Line 477:         Migrate a VM to a remote host.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ief35e1d335737cd98d21a5413ac9f8ab9d824c3e
Gerrit-PatchSet: 26
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list