Description of problem: When you run OST's basic suite you can see in the 'vdsm.log': 2019-07-25 10:26:50,567-0400 DEBUG (jsonrpc/4) [jsonrpc.JsonRpcServer] Calling 'Host.setKsmTune' in bridge with {u'tuningParams': {u'pages_to_scan': 64, u'run': 1, u'sleep_millisecs': 89.25152465623417}} (__init__:329) 2019-07-25 10:26:50,583-0400 ERROR (jsonrpc/4) [vds] setKsmTune API call failed. (API:1660) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/vdsm/API.py", line 1657, in setKsmTune supervdsm.getProxy().ksmTune(tuningParams) File "/usr/lib/python2.7/site-packages/vdsm/common/supervdsm.py", line 56, in __call__ return callMethod() File "/usr/lib/python2.7/site-packages/vdsm/common/supervdsm.py", line 54, in <lambda> **kwargs) File "<string>", line 2, in ksmTune File "/usr/lib64/python2.7/multiprocessing/managers.py", line 773, in _callmethod raise convert_to_error(kind, result) IOError: [Errno 22] Invalid argument This error is caused by trying to write a floating point value to '/sys/kernel/mm/ksm/sleep_millisecs' and can be reproduced manually with i.e.: echo 5.4 > /sys/kernel/mm/ksm/sleep_millisecs 'ksm' interfaces accept ints only and VDSM's verb schema follows these rules: https://github.com/oVirt/vdsm/blob/master/lib/vdsm/api/vdsm-api.yml#L3258 The default policy shipped with VDSM uses some math to obtain the 'sleep_millisecs' value: https://github.com/oVirt/vdsm/blob/e5c4450f58e119aed34cf23fcca39ecbd345fab4/static/etc/vdsm/mom.d/03-ksm.policy#L108 But the result of that calculation is a floating point number - it should be trimmed/rounded to an int. How reproducible: Always. Steps to Reproduce: 1. Run OST's basic suite 2. Look for 'setKsmTune'-related errors in 'vdsm.log', 'supervdsm.log' and 'mom.log' Actual results: MOM passes a floating point value for 'sleep_millisecs' field when calling 'Host.setKsmTune' VDSM's verb. Expected results: MOM passes a trimmed/rounded integer value for 'sleep_millisecs' field when calling 'Host.setKsmTune' VDSM's verb.
Verified on 4.4.0-0.17 by running the automation tests which check triggering KSM (check ksmState in Host,getStats). 'RPC call Host.setKsmTune succeeded' strings with no error in vdsm.log, no errors in mom.log. The tests work while /sys/kernel/mm/ksm/sleep_millisecs is 10. Tried manually insert the float number, like described - echo 9.9 > /sys/kernel/mm/ksm/sleep_millisecs - and got write error: Invalid argument.
This bugzilla is included in oVirt 4.4.1 release, published on July 8th 2020. Since the problem described in this bug report should be resolved in oVirt 4.4.1 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.