Bug 1138181 - setNumberOfCpus doesnt work if using json
Summary: setNumberOfCpus doesnt work if using json
Alias: None
Product: oVirt
Classification: Retired
Component: vdsm
Version: 3.5
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.5.0
Assignee: Piotr Kliczewski
QA Contact: Antonin Pagac
Whiteboard: infra
Depends On:
Blocks: 1073943
TreeView+ depends on / blocked
Reported: 2014-09-04 08:18 UTC by Omer Frenkel
Modified: 2016-02-10 19:30 UTC (History)
10 users (show)

Fixed In Version: v4.16.4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-10-17 12:29:19 UTC
oVirt Team: Infra

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
oVirt gerrit 32414 master MERGED setNumberOfCpus marshalling issue Never
oVirt gerrit 32454 ovirt-3.5 MERGED setNumberOfCpus marshalling issue Never

Description Omer Frenkel 2014-09-04 08:18:12 UTC
Description of problem:
Trying hot-plug cpu fails with the following exception:
Thread-5131::DEBUG::2014-09-03 16:55:56,825::__init__::467::jsonrpc.JsonRpcServer::(_serveRequest) Calling 'VM.setNumberOfCpus' in bridge with {u'numberOfCpus': u'1', u'vmID': u'e3dca780-cf24-47b9-a803-62ac086b7b10'}
Thread-5131::ERROR::2014-09-03 16:55:56,826::__init__::491::jsonrpc.JsonRpcServer::(_serveRequest) Internal server error
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/yajsonrpc/__init__.py", line 486, in _serveRequest
    res = method(**params)
  File "/usr/share/vdsm/rpc/Bridge.py", line 264, in _dynamicMethod
    raise InvalidCall(fn, methodArgs, e)
InvalidCall: Attempt to call function: <bound method VM.setNumberOfCpus of <API.VM object at 0x7f54e0a27c90>> with arguments: (u'1',) error: setNumberOfCpus() takes exactly 3 arguments (2 given)

i tried without json and it works

 {'kernel': {'buildtime': 1384114794.0,
	                        'release': '431.el6.x86_64',
	                        'version': '2.6.32'},
	             'libvirt': {'buildtime': 1406015335,
	                         'release': '29.el6_5.11',
	                         'version': '0.10.2'},
	             'mom': {'buildtime': 1403794344, 'release': '2.el6', 'version': '0.4.1'},
	             'qemu-img': {'buildtime': 1408575896,
	                          'release': '2.415.el6_5.14',
	                          'version': ''},
	             'qemu-kvm': {'buildtime': 1408575896,
	                          'release': '2.415.el6_5.14',
	                          'version': ''},
	             'spice-server': {'buildtime': 1401730350,
	                              'release': '6.el6_5.2',
	                              'version': '0.12.4'},
	             'vdsm': {'buildtime': 1408610413,
	                      'release': '1.gite8cba75.el6',
	                      'version': '4.16.2'}}

Comment 1 Antonin Pagac 2014-09-22 14:47:59 UTC
Verified in RHEVM Version: 3.5.0-0.11.beta.el6ev.

On Host, while using json, 'VM.setNumberOfCpus' completed without errors.

Comment 2 Sandro Bonazzola 2014-10-17 12:29:19 UTC
oVirt 3.5 has been released and should include the fix for this issue.

Note You need to log in before you can comment on or make changes to this bug.