Bug 1723873

Summary: [downstream clone - 4.3.5] ovirt-engine-4.1.11.2 fails to add disks with vdsm-4.30 hosts and 4.1 compatibility level: InvalidParameterException: Invalid parameter: 'DiskType=2'
Product: Red Hat Enterprise Virtualization Manager Reporter: RHV bug bot <rhv-bugzilla-bot>
Component: vdsmAssignee: shani <sleviim>
Status: CLOSED ERRATA QA Contact: Avihai <aefrat>
Severity: high Docs Contact:
Priority: high    
Version: 4.1.11CC: abpatil, amashah, bugs, lleistne, lsurette, mmartinv, nsoffer, obockows, pelauter, sbonazzo, sgoodman, sleviim, srevivo, tnisan, ycui
Target Milestone: ovirt-4.3.5Keywords: Regression, ZStream
Target Release: 4.3.5Flags: lsvaty: testing_plan_complete-
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: vdsm-4.30.22 Doc Type: Bug Fix
Doc Text:
In RHVM 4.1 and earlier, DiskType is an int value, while from RHVM 4.2 and later, DiskType is a string value. Consequently, using RHV 4.3 hosts with RHVM 4.1 causes the VDSM error "Invalid parameter: 'DiskType=2'" In this release, DiskType is once more an int value, so RHV 4.3 hosts can now work with RHVM 4.1.
Story Points: ---
Clone Of: 1711902 Environment:
Last Closed: 2019-08-12 11:53:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1711902    
Bug Blocks: 1720297    

Comment 3 RHV bug bot 2019-06-25 15:06:13 UTC
After downgrading to vdsm-4.20, adding a disk works again.

(Originally by Juan Orti Alcaine)

Comment 4 RHV bug bot 2019-06-25 15:06:15 UTC
Hi Juan,
Is the Engine version 4.3 or 4.1?

(Originally by Tal Nisan)

Comment 5 RHV bug bot 2019-06-25 15:06:17 UTC
Hi,

The engine is version ovirt-engine-4.1.11.2-0.1.el7.noarch

Steps to reproduce:

1. Install hosts with vdsm-4.30.13-4.el7ev.x86_64
2. Use ovirt-engine-4.1.11.2-0.1.el7.noarch
3. Cluster and datacenter to 4.1 compatibility level
4. Add a virtual disk to a VM on a NFS storage domain.

Results:

This error in engine.log and cannot add the disk:

2019-05-20 11:16:40,791+0200 INFO  (jsonrpc/2) [vdsm.api] START createVolume(sdUUID=u'a0814562-cece-4426-aeb0-42f565fc6fcc', spUUID=u'5849b030-626e-47cb-ad90-3ce782d831b3', imgUUID=u'35cbcdf9-1dad-419d-9a32-2e9b9118ae86', size=u'21474836480', volFormat=5, preallocate=2, diskType=2, volUUID=u'75184f63-fa62-4d6b-afa2-d0172773e737', desc=u'{"DiskAlias":"vmname_Disk2","DiskDescription":"test"}', srcImgUUID=u'00000000-0000-0000-0000-000000000000', srcVolUUID=u'00000000-0000-0000-0000-000000000000', initialSize=None) from=::ffff:10.0.0.1,51444, flow_id=43c01a35-414c-4261-b263-cca6f7a61ef1, task_id=4413556a-b81b-42f8-9f7e-769951708557 (api:48)
2019-05-20 11:16:40,792+0200 INFO  (jsonrpc/2) [vdsm.api] FINISH createVolume error=Invalid parameter: 'DiskType=2' from=::ffff:10.0.0.1,51444, flow_id=43c01a35-414c-4261-b263-cca6f7a61ef1, task_id=4413556a-b81b-42f8-9f7e-769951708557 (api:52)
2019-05-20 11:16:40,792+0200 ERROR (jsonrpc/2) [storage.TaskManager.Task] (Task='4413556a-b81b-42f8-9f7e-769951708557') 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 852, in validateCreateVolumeParams
    volFormat, srcVolUUID, diskType=diskType, preallocate=preallocate)
  File "/usr/lib/python2.7/site-packages/vdsm/storage/sd.py", line 601, in validateCreateVolumeParams
    raise se.InvalidParameterException("DiskType", diskType)
InvalidParameterException: Invalid parameter: 'DiskType=2'
2019-05-20 11:16:40,792+0200 INFO  (jsonrpc/2) [storage.TaskManager.Task] (Task='4413556a-b81b-42f8-9f7e-769951708557') aborting: Task is aborted: u"Invalid parameter: 'DiskType=2'" - code 100 (task:1181)
2019-05-20 11:16:40,792+0200 ERROR (jsonrpc/2) [storage.Dispatcher] FINISH createVolume error=Invalid parameter: 'DiskType=2' (dispatcher:83)
2019-05-20 11:16:40,793+0200 INFO  (jsonrpc/2) [jsonrpc.JsonRpcServer] RPC call Volume.create failed (error 1000) in 0.00 seconds (__init__:312)

Expected result:

Disk created and attached to the VM

Workaround:

Downgrading the hosts to vdsm-4.20 fixes the issue.

(Originally by Juan Orti Alcaine)

Comment 7 RHV bug bot 2019-06-25 15:06:20 UTC
This is a regression in 4.3, breaking compatibility with 4.1 engine.

I suggest to mark this as blocker for 4.3.5.

(Originally by Nir Soffer)

Comment 11 Avihai 2019-06-25 15:26:30 UTC
Hi Lucie,
Do you have tests that cover this scenario(as part of upgrade scenario)?

Comment 13 Lucie Leistnerova 2019-06-25 15:37:36 UTC
(In reply to Avihai from comment #11)
> Hi Lucie,
> Do you have tests that cover this scenario(as part of upgrade scenario)?

No, in our scenario we upgrade engine first, then hosts and run tests after.

Comment 14 Avihai 2019-06-30 07:07:35 UTC
Verified.

ovirt-engine-4.1.11.2-0.1.el7.noarch
vdsm-4.30.22-1.el7ev.x86_64 

Steps to verify(same as reproduction):

1. Cluster and datacenter to 4.1 compatibility level
2. Added host with vdsm-4.30.22-1.el7ev.x86_64 
3. On this host add a virtual disk to a VM on a NFS storage domain.

Comment 15 Steve Goodman 2019-07-18 15:35:29 UTC
Shani,

I edited the doc text. Please make sure that the text is accurate.

Comment 16 shani 2019-07-21 13:13:17 UTC
Approved

Comment 18 errata-xmlrpc 2019-08-12 11:53:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2432

Comment 19 Daniel Gur 2019-08-28 13:12:21 UTC
sync2jira

Comment 20 Daniel Gur 2019-08-28 13:16:34 UTC
sync2jira