Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1725390

Summary: ovirt-engine 4.3.5-2 fails to add disk/update OVF/deactivate SD on a storage domain which resides on a 4.1 compatibility level cluster: InvalidParameterException: Invalid parameter: 'DiskType=2
Product: [oVirt] vdsm Reporter: Avihai <aefrat>
Component: CoreAssignee: shani <sleviim>
Status: CLOSED CURRENTRELEASE QA Contact: Avihai <aefrat>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.30.23CC: bugs, nsoffer, sbonazzo, sleviim, tnisan
Target Milestone: ovirt-4.3.5Keywords: Automation, Regression
Target Release: 4.30.24Flags: sbonazzo: ovirt-4.3?
sbonazzo: blocker?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: vdsm-4.30.24 Doc Type: Bug Fix
Doc Text:
Cause: Failed to create a new disk for a VM over a cluster with a 4.1 compatibility. Consequence: The disk type is parsed as int instead of a string (due to a prior fix: Bug 1723873) Fix: Treat the disk type as a string Result: Creation succeeded.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-30 14:08:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine and vdsm logs none

Description Avihai 2019-06-30 11:21:12 UTC
Created attachment 1586002 [details]
engine and vdsm logs

Description of problem:
fails to add disks to a VM on a 4.1 compatibility level cluster on 4.3.5-2 engine: InvalidParameterException: Invalid parameter: 'DiskType=2.

This bug was introduced due to Bug 1723873 fix.

It has the same scenario as Bug 1723873 but in this bug the engine is 4.3.5 and not 4.1. 

VDSM log:
2019-06-30 12:30:08,934+0300 INFO  (jsonrpc/4) [vdsm.api] FINISH createVolume error=Invalid parameter: u'DiskType=2' from=::ffff:10.35.161.118,43186, flow_id=3c7d6215-c5f6-49a0-945a-092d9ac16699, task_id=a430ce8c-1638-4f93-9dc4-e518f54baef0 (api:52)
2019-06-30 12:30:08,935+0300 ERROR (jsonrpc/4) [storage.TaskManager.Task] (Task='a430ce8c-1638-4f93-9dc4-e518f54baef0') Unexpected error (task:875)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/vdsm/storage/task.py", line 882, in _run
    return fn(*args, **kargs)
  File "<string>", line 2, in createVolume
  File "/usr/lib/python2.7/site-packages/vdsm/common/api.py", line 50, in method
    ret = func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/vdsm/storage/hsm.py", line 1454, in createVolume
    volFormat, srcVolUUID, diskType=diskType, preallocate=preallocate)
  File "/usr/lib/python2.7/site-packages/vdsm/storage/sd.py", line 902, in validateCreateVolumeParams
    volFormat, srcVolUUID, diskType=diskType, preallocate=preallocate)
  File "/usr/lib/python2.7/site-packages/vdsm/storage/sd.py", line 632, in validateCreateVolumeParams
    raise se.InvalidParameterException("DiskType", diskType)
InvalidParameterException: Invalid parameter: u'DiskType=2'
2019-06-30 12:30:08,935+0300 DEBUG (jsonrpc/4) [storage.TaskManager.Task] (Task='a430ce8c-1638-4f93-9dc4-e518f54baef0') Task._run: a430ce8c-1638-4f93-9dc4-e518f54baef0 (u'6eeb476d-6bdd-4923-bdb6-c44a71552cb7', u'4592b461-67cc-4da7-be7d-9159117b92fa', u'9ab41562-c1e7-4d5c-ad65-437933413aa6', u'1073741824', 5, 2, u'2', u'df1a55e0-db36-4d63-a0c3-133f9599850e', u'{"DiskAlias":"vm_test_Disk1","DiskDescription":""}', u'00000000-0000-0000-0000-000000000000', u'00000000-0000-0000-0000-000000000000') {'initialSize': None} failed - stopping task (task:894)
2019-06-30 12:30:08,935+0300 DEBUG (jsonrpc/4) [storage.TaskManager.Task] (Task='a430ce8c-1638-4f93-9dc4-e518f54baef0') stopping in state failed (force False) (task:1256)
2019-06-30 12:30:08,935+0300 DEBUG (jsonrpc/4) [storage.TaskManager.Task] (Task='a430ce8c-1638-4f93-9dc4-e518f54baef0') ref 1 aborting True (task:1002)
2019-06-30 12:30:08,935+0300 INFO  (jsonrpc/4) [storage.TaskManager.Task] (Task='a430ce8c-1638-4f93-9dc4-e518f54baef0') aborting: Task is aborted: u"Invalid parameter: u'DiskType=2'" - code 100 (task:1181)

Engine:
2019-06-30 12:30:08,958+03 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-18) [3c7d6215-c5f6-49a0-945a-092d9ac16699] EVENT_ID: IRS_BROKER_COMMAND_FAILURE(10,803), VDS
M command CreateImageVDS failed: Invalid parameter: u'DiskType=2'
2019-06-30 12:30:08,958+03 ERROR [org.ovirt.engine.core.vdsbroker.irsbroker.CreateImageVDSCommand] (default task-18) [3c7d6215-c5f6-49a0-945a-092d9ac16699] Command 'CreateImageVDSCommand( CreateImageVDSCommandP
arameters:{storagePoolId='4592b461-67cc-4da7-be7d-9159117b92fa', ignoreFailoverLimit='false', storageDomainId='6eeb476d-6bdd-4923-bdb6-c44a71552cb7', imageGroupId='9ab41562-c1e7-4d5c-ad65-437933413aa6', imageSi
zeInBytes='1073741824', volumeFormat='RAW', newImageId='df1a55e0-db36-4d63-a0c3-133f9599850e', imageType='Sparse', newImageDescription='{"DiskAlias":"vm_test_Disk1","DiskDescription":""}', imageInitialSizeInByt
es='0'})' execution failed: IRSGenericException: IRSErrorException: Invalid parameter: u'DiskType=2'
2019-06-30 12:30:08,958+03 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.CreateImageVDSCommand] (default task-18) [3c7d6215-c5f6-49a0-945a-092d9ac16699] FINISH, CreateImageVDSCommand, return: 00000000-0000-0
000-0000-000000000000, log id: 9e33c74
2019-06-30 12:30:08,959+03 ERROR [org.ovirt.engine.core.bll.storage.disk.image.AddImageFromScratchCommand] (default task-18) [3c7d6215-c5f6-49a0-945a-092d9ac16699] Command 'org.ovirt.engine.core.bll.storage.disk.image.AddImageFromScratchCommand' failed: EngineException: org.




Version-Release number of selected component (if applicable):
Version 4.3.5.2-0.1.el7
vdsm-4.30.22-1.el7ev.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Create a DC+cluster on 4.1 compatibility level
2. Add NFS storage domain to that DC
3. Create VM
4. Add a disk to this VM

Actual results:
VM Disk addition fails.

Expected results:


Additional info:
This bug also affects OVF disk creation which increases its severity:
2019-06-30 13:18:04,267+03 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedThreadFactory-engineScheduled-Thread-19) [1fa609ab] EVENT_ID: IRS_BROKER_COMMAND_FAILURE(10,803), VDSM command CreateImageVDS failed: Invalid parameter: u'DiskType=2'
2019-06-30 13:18:04,268+03 ERROR [org.ovirt.engine.core.vdsbroker.irsbroker.CreateImageVDSCommand] (EE-ManagedThreadFactory-engineScheduled-Thread-19) [1fa609ab] Command 'CreateImageVDSCommand( CreateImageVDSCommandParameters:{storagePoolId='4592b461-67cc-4da7-be7d-9159117b92fa', ignoreFailoverLimit='false', storageDomainId='6eeb476d-6bdd-4923-bdb6-c44a71552cb7', imageGroupId='a6b8abe0-16f7-4f40-a203-f767f9cdabb6', imageSizeInBytes='134217728', volumeFormat='RAW', newImageId='5a9b2098-ac09-462d-8b4d-1cfb4c5e84d7', imageType='Preallocated', newImageDescription='{"DiskAlias":"OVF_STORE","DiskDescription":"OVF_STORE"}', imageInitialSizeInBytes='0'})' execution failed: IRSGenericException: IRSErrorException: Invalid parameter: u'DiskType=2'
2019-06-30 13:18:04,268+03 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.CreateImageVDSCommand] (EE-ManagedThreadFactory-engineScheduled-Thread-19) [1fa609ab] FINISH, CreateImageVDSCommand, return: 00000000-0000-0000-0000-000000000000, log id: 9f128e2
2019-06-30 13:18:04,268+03 ERROR [org.ovirt.engine.core.bll.storage.disk.image.AddImageFromScratchCommand] (EE-ManagedThreadFactory-engineScheduled-Thread-19) [1fa609ab] Command 'org.ovirt.engine.core.bll.storage.disk.image.AddImageFromScratchCommand' failed: EngineException: org.ovirt.engine.core.vdsbroker.irsbroker.IrsOperationFailedNoFailoverException: IRSGenericException: IRSErrorException: Invalid parameter: u'DiskType=2' (Failed with error InvalidParameterException and code 1000)

Comment 1 Avihai 2019-06-30 11:48:25 UTC
This effect the following on a SD/VM/Disk that is created on 4.1 cluster:

1) creating disk floating or on VM fails
2) updating OVF fails
3) deactivating storage domain with OVF update fails

Comment 2 Avihai 2019-06-30 11:57:44 UTC
Also ISCSI and Gluster disks/SD's on 4.1 cluster are effected.

Comment 3 Nir Soffer 2019-07-02 15:11:33 UTC
Moving to vdsm since this is vdsm regression in 4.3.

Comment 4 Nir Soffer 2019-07-02 15:14:09 UTC
Sandro, this is another blocker for 4.3.5 (regression introduced by the previous
fix already included in 4.3.5).

Comment 5 Sandro Bonazzola 2019-07-10 06:58:58 UTC
(In reply to Nir Soffer from comment #4)
> Sandro, this is another blocker for 4.3.5 (regression introduced by the
> previous
> fix already included in 4.3.5).

taken

Comment 6 Avihai 2019-07-14 06:57:37 UTC
Verified at ovirt-engine 4.3.5.4/vdsm-4.30.24-2.el7ev.x86_64.

Steps to Reproduce:
1. Create a DC+cluster on 4.1 compatibility level
2. Add NFS storage domain to that DC
3. Create VM
4. Add a disk to this VM

Actual results:
VM Disk addition succeeds.

Comment 7 Sandro Bonazzola 2019-07-30 14:08:11 UTC
This bugzilla is included in oVirt 4.3.5 release, published on July 30th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.5 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.