Description of problem: When a CPU limit is set for a VM using the QoS feature the limit is ignored and the VM is started as usual. Version-Release number of selected component (if applicable): ovirt-engine-3.5.0-0.0.master.20140911091402.gite1c5ffd.fc20.noarch vdsm-4.16.4-0.fc20.x86_64 How reproducible: Always. Steps to Reproduce: 1. Set up a QoS limit of 50% (the values isn't relevant) for the CPU of a VM. 2. Start the VM. 3. Run the following command in the VM: dd if=/dev/zero of=/dev/null. This should consume 100% of one CPU in the VM. Actual results: The 100% of the CPU of the hypervisor is used. Expected results: Oonly 50% of the CPU of the hypervisor is used. Additional info: The VDSM log shows the following error message: Thread-142::DEBUG::2014-09-17 15:25:42,175::__init__::467::jsonrpc.JsonRpcServer::(_serveRequest) Calling 'VM.updateVmPolicy' in bridge with {u'params': {u'vmId': u'3b09ff2c-e94f-4fbd-985f-dd6e176008c2', u'vcpuLimit': u'50'}} Thread-142::ERROR::2014-09-17 15:25:42,176::__init__::491::jsonrpc.JsonRpcServer::(_serveRequest) Internal server error Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/yajsonrpc/__init__.py", line 486, in _serveRequest res = method(**params) File "/usr/share/vdsm/rpc/Bridge.py", line 256, in _dynamicMethod api = self._getApiInstance(className, argobj) File "/usr/share/vdsm/rpc/Bridge.py", line 185, in _getApiInstance return apiObj(*ctorArgs) TypeError: __init__() takes exactly 2 arguments (1 given) Note that the engine is ending a parameter named "vmId" to identify the VM, but according to the code in API.py VDSM it expects "vmID" (note the uppercase D). The "vmId" parameter is populated in the engine, in class UpdateVmPolicyVDSCommand.
Note that the line number in the above error message isn't accurate, as in introduced some traces to try to find the issue. The original error happened in line 179 of Bridge.py.
I assume this is a jsonrpc issue, Piotr reassigning to you , if this is not the case please move back to sla.
It is marshaling issue but the params are set outside of jsonrpc code. It was developed after the initial jsonrpc implementation. I will fix.
Marshaling issue fixed and assigning to Martin since there are more issues with this verb.
Martin - please test that with the applied fix, and come back with insights/logs. Feel free to consult Piotr. Move it back to infra if needed.
Here is print out of the response that we get from the method (line 286): Thread-222::DEBUG::2014-09-23 14:39:54,112::__init__::467::jsonrpc.JsonRpcServer::(_serveRequest) Calling 'VM.updateVmPolicy' in bridge with {u'params': {u'vmId': u'f6d509f6-d141-42d9-82fc-19127f008aeb', u'vcpuLimit': u'50'}, u'vmID': u'f6d509f6-d141-42d9-82fc-19127f008aeb'} Thread-222::DEBUG::2014-09-23 14:39:54,114::libvirtconnection::143::root::(wrapper) Unknown libvirterror: ecode: 80 edom: 20 level: 2 message: metadata not found: Requested metadata element is not present Thread-222::DEBUG::2014-09-23 14:39:54,115::Bridge::286::root::(_dynamicMethod) None Thread-222::ERROR::2014-09-23 14:39:54,115::__init__::491::jsonrpc.JsonRpcServer::(_serveRequest) Internal server error Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/yajsonrpc/__init__.py", line 486, in _serveRequest res = method(**params) File "/usr/share/vdsm/rpc/Bridge.py", line 287, in _dynamicMethod return self._fixupRet(className, methodName, ret) File "/usr/share/vdsm/rpc/Bridge.py", line 236, in _fixupRet self._typeFixup('return', retType, result) File "/usr/share/vdsm/rpc/Bridge.py", line 216, in _typeFixup if k in item: TypeError: argument of type 'NoneType' is not iterable
The parameter name was fixed and all should be properly bubbling through vdsm now.
oVirt 3.5.1 has been released and since this bug is targeted 3.5.1 and in modified state, it should be included in this release. Please re-target and move nack to modified if this assumption is not valid for this bug.