Bug 1348255

Summary: sla: fix schema validation warnings
Product: [oVirt] vdsm Reporter: Piotr Kliczewski <pkliczew>
Component: Bindings-APIAssignee: Andrej Krejcir <akrejcir>
Status: CLOSED CURRENTRELEASE QA Contact: Artyom <alukiano>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.18.15CC: alukiano, bugs, dfediuck, gklein, pkliczew, pstehlik
Target Milestone: ovirt-4.0.6Keywords: Triaged, ZStream
Target Release: 4.18.16Flags: rule-engine: ovirt-4.0.z+
rule-engine: planning_ack+
rgolan: devel_ack+
pstehlik: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-18 07:28:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Piotr Kliczewski 2016-06-20 15:10:11 UTC
This BZ is created to track yaml schema alignment with runtime.

Comment 1 Doron Fediuck 2016-06-21 11:55:03 UTC
Can you be more specific or give an example?

Comment 2 Piotr Kliczewski 2016-06-21 13:50:50 UTC
I opened this BZ to be sure that we can track that data that we send/receive in vdsm is aligned with schema. I know that there are small discrepancies and I do not know how to run all of the sla use cases. Please make sure that none of verbs causes any warnings.

Comment 3 Andrej Krejcir 2016-09-20 15:35:02 UTC
These are sla verbs:

Host.setMOMPolicy
Host.setMOMPolicyParameters
Host.setKsmTune
Host.setHaMaintenanceMode
VM.setBalloonTarget
VM.setNumberOfCpus
VM.setIoTune
VM.getIoTune
VM.getIoTunePolicy
VM.setCpuTuneQuota
VM.setCpuTunePeriod
VM.updateVmPolicy

Comment 4 Artyom 2016-11-10 13:55:27 UTC
Checked on:
# rpm -qa | grep vdsm
vdsm-python-4.18.15.2-1.el7ev.noarch
vdsm-hook-vmfex-dev-4.18.15.2-1.el7ev.noarch
vdsm-xmlrpc-4.18.15.2-1.el7ev.noarch
vdsm-jsonrpc-4.18.15.2-1.el7ev.noarch
vdsm-4.18.15.2-1.el7ev.x86_64
vdsm-api-4.18.15.2-1.el7ev.noarch
vdsm-cli-4.18.15.2-1.el7ev.noarch
vdsm-yajsonrpc-4.18.15.2-1.el7ev.noarch
vdsm-hook-ethtool-options-4.18.15.2-1.el7ev.noarch
vdsm-infra-4.18.15.2-1.el7ev.noarch

I can see that patch changes do not exist under packages above

Comment 5 Martin Sivák 2016-11-10 14:03:26 UTC
Artyom: what do you see? What patch changes? Can you be more specific about what was tested?

Comment 6 Artyom 2016-11-13 09:14:49 UTC
I checked files that under the patch and files on my host.
For example file jsonrpcvdscli.py includes:
    'hotplugMemory': 'VM.hotplugMemory',
    'list': 'Host.getVMList',
    'migrationCreate': 'VM.migrationCreate',
    'ping': 'Host.ping',
    'prepareImage': 'Image.prepare',
    'repoStats': 'Host.getStorageRepoStats',
    'setBalloonTarget': 'VM.setBalloonTarget',
    'setCpuTunePeriod': 'VM.setCpuTunePeriod',
    'setCpuTuneQuota': 'VM.setCpuTuneQuota',
    'setNumberOfCpus': 'VM.setNumberOfCpus',
    'setKsmTune': 'Host.setKsmTune',
    'setHaMaintenanceMode': 'Host.setHaMaintenanceMode',

when the same file on the host does not include hotplugMemory, setNumberOfCpus and setHaMaintenanceMode
    'hotunplugNic': 'VM.hotunplugNic',
    'list': 'Host.getVMList',
    'migrationCreate': 'VM.migrationCreate',
    'ping': 'Host.ping',
    'prepareImage': 'Image.prepare',
    'repoStats': 'Host.getStorageRepoStats',
    'setBalloonTarget': 'VM.setBalloonTarget',
    'setCpuTunePeriod': 'VM.setCpuTunePeriod',
    'setCpuTuneQuota': 'VM.setCpuTuneQuota',
    'setKsmTune': 'Host.setKsmTune',
    'setMOMPolicy': 'Host.setMOMPolicy',
    'setSafeNetworkConfig': 'Host.setSafeNetworkConfig',

Comment 7 Artyom 2016-11-22 10:15:54 UTC
Verified on vdsm-4.18.16-1.el7ev.x86_64

Succeeds to run:

from vdsm import jsonrpcvdscli
from vdsm.config import config

requestQueues = config.get('addresses', 'request_queues')
requestQueue = requestQueues.split(',')[0]
conn = jsonrpcvdscli.connect(requestQueue)
conn.setNumberOfCpus("f333370d-9c24-4062-8ad8-3bf6c18f877c", 2)
conn.hotplugMemory("f333370d-9c24-4062-8ad8-3bf6c18f877c", {'vmId': 'f333370d-9c24-4062-8ad8-3bf6c18f877c', 'memory': {'node': 0, 'size': 1024}})
conn.updateVmPolicy('f333370d-9c24-4062-8ad8-3bf6c18f877c', {'vmId': 'f333370d-9c24-4062-8ad8-3bf6c18f877c', 'vcpuLimit': 30})