Yaniv Bronhaim has posted comments on this change.

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


Patch Set 26: Code-Review+1

(3 comments)

....................................................
Commit Message
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 ?
Line 47: Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1036492


....................................................
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:

log.error('Missing one of required parameters: vmId (%s), numberOfCpus (%s)', 
vmId, numberOfCpus)

it'll be easier to know which value is missing
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 don't 
handle. I think its find, but just alerting..
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 <rgo...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Eduardo <ewars...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizr...@redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeen...@redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to