Bug 1714834
| Summary: | Cannot disable SCSI passthrough using API | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | nijin ashok <nashok> | |
| Component: | ovirt-engine | Assignee: | Tal Nisan <tnisan> | |
| Status: | CLOSED ERRATA | QA Contact: | Yosi Ben Shimon <ybenshim> | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 4.3.1 | CC: | aefrat, ldelouw, omachace, sirao, tnisan | |
| Target Milestone: | ovirt-4.4.0 | Keywords: | ZStream | |
| Target Release: | --- | Flags: | lsvaty:
testing_plan_complete-
|
|
| Hardware: | All | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1719737 (view as bug list) | Environment: | ||
| Last Closed: | 2020-08-04 13:19:31 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: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1719737 | |||
|
Description
nijin ashok
2019-05-29 02:34:15 UTC
Ondra, how can we send a PUT request that will nullify an enum field? Seems that sending an empty value fails I would introduce new value called DISABLED as we have for other enums. sync2jira sync2jira Tested on:
ovirt-engine-4.4.0-0.6.master.el7.noarch
vdsm-4.40.0-154.git4e13ea9.el8ev.x86_64
Created a VM with direct LUN disk via UI.
Managed to move the sgio from 'filtered' to 'disabled' using both UI and REST-API.
From the UI:
VM -> DISKS -> Edit button -> check/uncheck the 'Enable SCSI Pass-Through'
From REST-API:
PUT request to https://<engine>/ovirt-engine/api/disks/<disk_id>
<disk>
<sgio>disabled</sgio>
</disk>
OR
<disk>
<sgio>filtered</sgio>
</disk>
* When tried to use a value like 'aaa', the response was:
<fault>
<detail>The string 'aaa' isn't a valid value for the 'ScsiGenericIO' enumerated type. Valid values are: 'filtered', 'unfiltered', 'disabled'.</detail>
<reason>Invalid value</reason>
</fault>
Moving to VERIFIED
WARN: Bug status (VERIFIED) wasn't changed but the folowing should be fixed:
[Found non-acked flags: '{}', ]
For more info please contact: rhv-devops: Bug status (VERIFIED) wasn't changed but the folowing should be fixed:
[Found non-acked flags: '{}', ]
For more info please contact: rhv-devops
WARN: Bug status (VERIFIED) wasn't changed but the folowing should be fixed:
[Found non-acked flags: '{}', ]
For more info please contact: rhv-devops: Bug status (VERIFIED) wasn't changed but the folowing should be fixed:
[Found non-acked flags: '{}', ]
For more info please contact: rhv-devops
WARN: Bug status (VERIFIED) wasn't changed but the folowing should be fixed:
[Found non-acked flags: '{}', ]
For more info please contact: rhv-devops: Bug status (VERIFIED) wasn't changed but the folowing should be fixed:
[Found non-acked flags: '{}', ]
For more info please contact: rhv-devops
WARN: Bug status (VERIFIED) wasn't changed but the folowing should be fixed:
[Found non-acked flags: '{}', ]
For more info please contact: rhv-devops: Bug status (VERIFIED) wasn't changed but the folowing should be fixed:
[Found non-acked flags: '{}', ]
For more info please contact: rhv-devops
WARN: Bug status (VERIFIED) wasn't changed but the folowing should be fixed:
[Found non-acked flags: '{}', ]
For more info please contact: rhv-devops: Bug status (VERIFIED) wasn't changed but the folowing should be fixed:
[Found non-acked flags: '{}', ]
For more info please contact: rhv-devops
I tried running this with the python SDK. It worked for 4.3.7 RHV Manager, but failed for 4.4 beta.
---------
# python3.6 test.py
Traceback (most recent call last):
File "test.py", line 31, in <module>
sgio=types.ScsiGenericIO('disabled')
File "/usr/lib64/python3.6/site-packages/ovirtsdk4/services.py", line 6921, in update
return self._internal_update(disk_attachment, headers, query, wait)
File "/usr/lib64/python3.6/site-packages/ovirtsdk4/service.py", line 253, in _internal_update
return future.wait() if wait else future
File "/usr/lib64/python3.6/site-packages/ovirtsdk4/service.py", line 55, in wait
return self._code(response)
File "/usr/lib64/python3.6/site-packages/ovirtsdk4/service.py", line 250, in callback
self._check_fault(response)
File "/usr/lib64/python3.6/site-packages/ovirtsdk4/service.py", line 132, in _check_fault
self._raise_error(response, body)
File "/usr/lib64/python3.6/site-packages/ovirtsdk4/service.py", line 118, in _raise_error
raise error
ovirtsdk4.Error: Fault reason is "Operation Failed". Fault detail is "[Internal Engine Error]". HTTP response code is 400.
ENGINE LOGS
-----------
~~~
2020-05-14 19:55:07,317Z INFO [org.ovirt.engine.core.bll.storage.disk.UpdateDiskCommand] (default task-17) [0ab71037-8173-443a-bd1f-9055f059f54f] Lock Acquired to object 'EngineLock:{exclusiveLocks='[b0a7aa52-bece-4438-a8c7-b6ec9f2e9abb=DISK]', sharedLocks='[3264cf77-5515-4693-9314-2c34b378a630=VM]'}'
2020-05-14 19:55:07,371Z INFO [org.ovirt.engine.core.bll.storage.disk.UpdateDiskCommand] (default task-17) [0ab71037-8173-443a-bd1f-9055f059f54f] Running command: UpdateDiskCommand internal: false. Entities affected : ID: b0a7aa52-bece-4438-a8c7-b6ec9f2e9abb Type: DiskAction group EDIT_DISK_PROPERTIES with role type USER, ID: b0a7aa52-bece-4438-a8c7-b6ec9f2e9abb Type: DiskAction group CONFIGURE_SCSI_GENERIC_IO with role type ADMIN
2020-05-14 19:55:07,371Z ERROR [org.ovirt.engine.core.bll.storage.disk.UpdateDiskCommand] (default task-17) [0ab71037-8173-443a-bd1f-9055f059f54f] Command 'org.ovirt.engine.core.bll.storage.disk.UpdateDiskCommand' failed: class org.ovirt.engine.core.common.businessentities.storage.LunDisk cannot be cast to class org.ovirt.engine.core.common.businessentities.storage.DiskImage (org.ovirt.engine.core.common.businessentities.storage.LunDisk and org.ovirt.engine.core.common.businessentities.storage.DiskImage are in unnamed module of loader 'org.ovirt.engine.core.common' @511513ff)
2020-05-14 19:55:07,371Z ERROR [org.ovirt.engine.core.bll.storage.disk.UpdateDiskCommand] (default task-17) [0ab71037-8173-443a-bd1f-9055f059f54f] Exception: java.lang.ClassCastException: class org.ovirt.engine.core.common.businessentities.storage.LunDisk cannot be cast to class org.ovirt.engine.core.common.businessentities.storage.DiskImage (org.ovirt.engine.core.common.businessentities.storage.LunDisk and org.ovirt.engine.core.common.businessentities.storage.DiskImage are in unnamed module of loader 'org.ovirt.engine.core.common' @511513ff)
at deployment.engine.ear.bll.jar//org.ovirt.engine.core.bll.storage.disk.UpdateDiskCommand.lockImageInDb(UpdateDiskCommand.java:1032)
at deployment.engine.ear.bll.jar//org.ovirt.engine.core.bll.storage.disk.UpdateDiskCommand.executeVmCommand(UpdateDiskCommand.java:212)
at deployment.engine.ear.bll.jar//org.ovirt.engine.core.bll.VmCommand.executeCommand(VmCommand.java:177)
~~~
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 (Important: RHV Manager (ovirt-engine) 4.4 security, bug fix, and enhancement update), 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/RHSA-2020:3247 |