[ovirt-devel] Type verification for vdsm

Piotr Kliczewski piotr.kliczewski at gmail.com
Mon Mar 7 22:05:49 UTC 2016


On Mon, Mar 7, 2016 at 9:42 PM, Nir Soffer <nsoffer at redhat.com> wrote:
> On Mon, Mar 7, 2016 at 10:26 PM, Piotr Kliczewski
> <piotr.kliczewski at gmail.com> wrote:
>> All,
>>
>> I started to run type verification tests without strict mode and here
>> are some inconsistencies:
>> Please note that some of the entries are many times which corresponds
>> with number of occurrances of particular issue.
>>
>> Host.getCapabilities
>>
>> - return data from vdms:
>> Following parameters ['supportsIPv6', 'hostdevPassthrough',
>> 'lastClientIface'] were not recognized
>> Following parameters ['dhcpv6', 'ipv6gateway', 'gateway'] were not recognized
>> Parameter mtu is not uint type
>> Provided value "0" not defined in AutoNumaBalancingStatus enum for
>> Host.getCapabilities
>> Parameter netConfigDirty is not boolean type
>> Following parameters ['ipv6gateway', 'dhcpv6', 'cfg', 'gateway'] were
>> not recognized
>> No default value specified for permhwaddr parameter in Host.getCapabilities
>> Parameter mtu is not uint type
>> Parameter reservedMem is not uint type
>> Parameter cpuSpeed is not float type
>> Required property directedPassthrough is not provided when calling
>> Host.getCapabilities
>> Parameter totalMemory is not uint type
>> Parameter memSize is not uint type
>> Parameter mode is not int type
>> Provided parameters {'iface': 'ovirtmgmt', 'addr': '192.168.1.106',
>> 'cfg': {'IPV6INIT': 'no', 'DEFROUTE': 'yes', 'HOTPLUG': 'no', 'MTU':
>> '1500', 'DELAY': '0', 'NM_CONTROLLED': 'no', 'BOOTPROTO': 'dhcp',
>> 'STP': 'off', 'DEVICE': 'ovirtmgmt', 'TYPE': 'Bridge', 'ONBOOT':
>> 'yes'}, 'bridged': True, 'ipv6addrs':
>> ['fe80::baca:3aff:fea9:77e2/64'], 'gateway': '192.168.1.1', 'dhcpv4':
>> True, 'netmask': '255.255.255.0', 'dhcpv6': False, 'stp': 'off',
>> 'ipv4addrs': ['192.168.1.106/24'], 'mtu': '1500', 'ipv6gateway': '::',
>> 'ports': ['em1']} do not match any of union NetInfoNetwork values
>> Parameter kvmEnabled is not boolean type
>> Parameter liveMerge is not boolean type
>> Parameter cpuThreads is not uint type
>> Parameter liveSnapshot is not boolean type
>> Following parameters ['dhcpv6'] were not recognized
>> Parameter mtu is not uint type
>> Parameter stp is not boolean type
>> No default value specified for hostQos parameter in Host.getCapabilities
>> Required property bridged is not provided when calling Host.getCapabilities
>> Parameter guestOverhead is not uint type
>> Parameter cpuCores is not uint type
>> Parameter cpuSockets is not uint type
>> Required property ipv6Supported is not provided when calling
>> Host.getCapabilities
>> Parameter buildtime is not string type
>> Parameter buildtime is not string type
>> Provided value "librbd1" not defined in SoftwarePackage enum for
>> Host.getCapabilities
>> Parameter buildtime is not string type
>> Parameter buildtime is not string type
>> Parameter buildtime is not string type
>> Parameter buildtime is not string type
>> Parameter buildtime is not string type
>> Parameter buildtime is not string type
>> Provided value "glusterfs-cli" not defined in SoftwarePackage enum for
>> Host.getCapabilities
>> Parameter buildtime is not string type
>> Following parameters ['50_vmfex'] were not recognized
>> Required property md5 is not provided when calling Host.getCapabilities
>> Following parameters ['50_vmfex'] were not recognized
>> Required property md5 is not provided when calling Host.getCapabilities
>> Following parameters ['50_vmfex'] were not recognized
>> Required property md5 is not provided when calling Host.getCapabilities
>>
>> Host.getHardwareInfo
>>
>> - return data from vdsm
>>
>> No default value specified for systemProductName parameter in
>> Host.getHardwareInfo
>> No default value specified for systemUUID parameter in Host.getHardwareInfo
>> No default value specified for systemManufacturer parameter in
>> Host.getHardwareInfo
>> No default value specified for systemVersion parameter in Host.getHardwareInfo
>> No default value specified for systemFamily parameter in Host.getHardwareInfo
>> No default value specified for systemSerialNumber parameter in
>> Host.getHardwareInfo
>>
>> Host.setMOMPolicyParameters
>>
>> - return data from vdsm
>>
>> Unsupported type dict in Host.setMOMPolicyParameters please fix
>>
>> Host.hostdevListByCaps
>>
>> - return data from vdsm
>>
>> The return type is not a list of HostDevices but it is a map and
>> HostDevice do not match data sent
>>
>> Host.getStats
>>
>> - return data from vdsm
>>
>> Following parameters ['ksmMergeAcrossNodes', 'haStats'] were not recognized
>> Parameter cpuUserVdsmd is not float type
>> Parameter rxRate is not float type
>> Parameter cpuLoad is not float type
>> Parameter memUsed is not uint type
>> Parameter cpuIdle is not float type
>> Parameter txRate is not float type
>> Parameter txDropped is not uint type
>> Parameter elapsedTime is not uint type
>> Parameter netConfigDirty is not boolean type
>> Parameter rxErrors is not uint type
>> Parameter rxRate is not float type
>> Parameter rx is not uint type
>> Parameter txDropped is not uint type
>> Parameter txErrors is not uint type
>> Parameter txRate is not float type
>> Parameter speed is not uint type
>> Parameter tx is not uint type
>> Parameter rxDropped is not uint type
>> Parameter rxErrors is not uint type
>> Parameter rxRate is not float type
>> Parameter rx is not uint type
>> Parameter txDropped is not uint type
>> Parameter txErrors is not uint type
>> Parameter txRate is not float type
>> Parameter speed is not uint type
>> Parameter tx is not uint type
>> Parameter rxDropped is not uint type
>> Parameter rxErrors is not uint type
>> Parameter rxRate is not float type
>> Parameter rx is not uint type
>> Parameter txDropped is not uint type
>> Parameter txErrors is not uint type
>> Parameter txRate is not float type
>> Parameter speed is not uint type
>> Parameter tx is not uint type
>> Parameter rxDropped is not uint type
>> Parameter rxErrors is not uint type
>> Parameter rxRate is not float type
>> Parameter rx is not uint type
>> Parameter txDropped is not uint type
>> Parameter txErrors is not uint type
>> Parameter txRate is not float type
>> Parameter speed is not uint type
>> Parameter tx is not uint type
>> Parameter rxDropped is not uint type
>> Parameter rxErrors is not uint type
>> Parameter rxRate is not float type
>> Parameter rx is not uint type
>> Parameter txDropped is not uint type
>> Parameter txErrors is not uint type
>> Parameter txRate is not float type
>> Parameter speed is not uint type
>> Parameter tx is not uint type
>> Parameter rxDropped is not uint type
>> Parameter rxErrors is not uint type
>> Parameter rxRate is not float type
>> Parameter rx is not uint type
>> Parameter txDropped is not uint type
>> Parameter txErrors is not uint type
>> Parameter txRate is not float type
>> Parameter speed is not uint type
>> Parameter tx is not uint type
>> Parameter rxDropped is not uint type
>> Parameter cpuSys is not float type
>> Following parameters ['nodeIndex'] were not recognized
>> Parameter cpuSys is not float type
>> Parameter cpuUser is not float type
>> Required property numaNodeIndex is not provided when calling Host.getStats
>> Parameter cpuIdle is not float type
>> Following parameters ['nodeIndex'] were not recognized
>> Parameter cpuSys is not float type
>> Parameter cpuUser is not float type
>> Required property numaNodeIndex is not provided when calling Host.getStats
>> Parameter cpuIdle is not float type
>> Following parameters ['nodeIndex'] were not recognized
>> Parameter cpuSys is not float type
>> Parameter cpuUser is not float type
>> Required property numaNodeIndex is not provided when calling Host.getStats
>> Parameter cpuIdle is not float type
>> Following parameters ['nodeIndex'] were not recognized
>> Parameter cpuSys is not float type
>> Parameter cpuUser is not float type
>> Required property numaNodeIndex is not provided when calling Host.getStats
>> Parameter cpuIdle is not float type
>> Following parameters ['nodeIndex'] were not recognized
>> Parameter cpuSys is not float type
>> Parameter cpuUser is not float type
>> Required property numaNodeIndex is not provided when calling Host.getStats
>> Parameter cpuIdle is not float type
>> Following parameters ['nodeIndex'] were not recognized
>> Parameter cpuSys is not float type
>> Parameter cpuUser is not float type
>> Required property numaNodeIndex is not provided when calling Host.getStats
>> Parameter cpuIdle is not float type
>> Following parameters ['nodeIndex'] were not recognized
>> Parameter cpuSys is not float type
>> Parameter cpuUser is not float type
>> Required property numaNodeIndex is not provided when calling Host.getStats
>> Parameter cpuIdle is not float type
>> Following parameters ['nodeIndex'] were not recognized
>> Parameter cpuSys is not float type
>> Parameter cpuUser is not float type
>> Required property numaNodeIndex is not provided when calling Host.getStats
>> Parameter cpuIdle is not float type
>> Parameter cpuUser is not float type
>> Parameter ksmCpu is not float type
>> Parameter memFree is not uint type
>> Parameter free is not uint type
>> Parameter free is not uint type
>> Parameter free is not uint type
>> Parameter free is not uint type
>> Parameter cpuSysVdsmd is not float type
>> Required property haStatus is not provided when calling Host.getStats
>> Parameter bootTime is not uint type
>> Parameter rxDropped is not uint type
>> Parameter anonHugePages is not uint type
>>
>> StoragePool.disconnectStorageServer
>>
>> - request data
>>
>> Provided value "1" not defined in StorageDomainType enum for
>> StoragePool.disconnectStorageServer
>> Provided parameters {u'id': u'9228a1f7-5311-4136-86eb-87a4f916616e',
>> u'connection': u'1.1.1.1:/export/data', u'iqn': u'', u'user': u'',
>> u'tpgt': u'1', u'protocol_version': u'3', u'password': '********',
>> u'port': u''} do not match any of union ConnectionRefParameters values
>
> Yes, this is a known issue, engine sends the enum value instead of the
> name, making
> debugging much harder. Unfortunately, we cannot fix this because we
> must be compatible
> with older engines.
>
> I think we will provide a new verb requiring the correct type, and
> deprecate the old verb.
>

What do you think about changing schema to define proper types. We
can't change the
data but we can have consistent definition of it.

>>
>> StorageDomain.create
>>
>> - request data
>>
>> Provided value "1" not defined in StorageDomainType enum for
>> StorageDomain.create
>> Parameter typeArgs is defined as StorageDomainCreateArguments but it is a string
>
> Same
>
>>
>> StoragePool.connectStorageServer
>>
>> - request data
>>
>> Provided value "1" not defined in StorageDomainType enum for
>> StoragePool.connectStorageServer
>> Provided parameters {u'id': u'9228a1f7-5311-4136-86eb-87a4f916616e',
>> u'connection': u'1.1.1.1:/export/data', u'iqn': u'', u'user': u'',
>> u'tpgt': u'1', u'protocol_version': u'3', u'password': '********',
>> u'port': u''} do not match any of union ConnectionRefParameters values
>
> Same
>
>>
>>
>>
>> Many more verbs to come.
>>
>> It seems that there is more verbs which do not comply with schema than
>> those that do. I am not able to progress more with the validation
>> because StorageDomain.create and Host.hostdevListByCaps currently
>> break validation code due to type inconsistencies. I need to make it
>> more resilient.
>
> Thanks for this work!
>
> Nir



More information about the Devel mailing list