Bug 1719737 - [downstream clone - 4.3.5] Cannot disable SCSI passthrough using API
Summary: [downstream clone - 4.3.5] Cannot disable SCSI passthrough using API
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.3.1
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ovirt-4.3.5
: 4.3.5
Assignee: Tal Nisan
QA Contact: Avihai
URL:
Whiteboard:
Depends On: 1714834
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-12 12:45 UTC by RHV bug bot
Modified: 2019-08-12 11:53 UTC (History)
4 users (show)

Fixed In Version: ovirt-engine-4.3.5.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1714834
Environment:
Last Closed: 2019-08-12 11:53:28 UTC
oVirt Team: Storage
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2019:2431 0 None None None 2019-08-12 11:53:40 UTC
oVirt gerrit 100532 0 'None' 'MERGED' 'Allow setting a disk ScsiGenericIO to disabled' 2019-11-11 17:33:56 UTC
oVirt gerrit 100533 0 'None' 'MERGED' 'restapi: Allow setting a disk ScsiGenericIO to disabled' 2019-11-11 17:33:56 UTC
oVirt gerrit 100657 0 'None' 'MERGED' 'Allow setting a disk ScsiGenericIO to disabled' 2019-11-11 17:33:56 UTC
oVirt gerrit 100747 0 'None' 'MERGED' 'restapi: Update to model 4.4.2' 2019-11-11 17:33:56 UTC
oVirt gerrit 100758 0 'None' 'MERGED' 'restapi: Update to model 4.3.5' 2019-11-11 17:33:56 UTC
oVirt gerrit 101067 0 'None' 'MERGED' 'restapi: Allow setting a disk ScsiGenericIO to disabled' 2019-11-11 17:33:57 UTC

Description RHV bug bot 2019-06-12 12:45:51 UTC
+++ This bug is a downstream clone. The original bug is: +++
+++   bug 1714834 +++
======================================================================

Description of problem:

The option which is available to configure the SCSI passthrough is sgio. The sgio only accepts FILTERED/UNFILTERED value which disables/enables "Privileged SCSI I/O". So once SCSI passthrough is enabled, there is no way to disable it using API. If we pass an empty value "<sgio></sgio>", it will fail with error below.

<detail>The string '' isn't a valid value for the 'ScsiGenericIO' enumerated type. Valid values are: 'filtered', 'unfiltered'.</detail>

Version-Release number of selected component (if applicable):

ovirt-engine-4.3.3.7-0.1.el7.noarch

How reproducible:

100%

Steps to Reproduce:

Try to disable the SCSI passthrough using API.

Actual results:

Cannot disable SCSI passthrough using API.

Expected results:

Provide a way to disable SCSI passthrough using API.

Additional info:

(Originally by Nijin Ashok)

Comment 1 RHV bug bot 2019-06-12 12:45:53 UTC
Ondra, how can we send a PUT request that will nullify an enum field? Seems that sending an empty value fails

(Originally by Tal Nisan)

Comment 2 RHV bug bot 2019-06-12 12:45:54 UTC
I would introduce new value called DISABLED as we have for other enums.

(Originally by Ondra Machacek)

Comment 4 Avihai 2019-06-27 15:57:01 UTC
Added to automation as well on ovirt-engine 4.3.5-1

1) Direct LUN disk with enabled passthrough unfiltered mode :
    </disk>
............................................................................................................
        <name>new_direct_lun_5918</name>
        <description></description>
        <alias>new_direct_lun_5918</alias>
............................................................................................................
        <sgio>unfiltered</sgio>
    </disk>


2) Disabling an enabled passthrough direct LUN disk to passthrough disabled is successfull:

2019-06-27 17:42:29,081 - MainThread - diskattachments - DEBUG - PUT request content is --  url:/ovirt-engine/api/vms/28eb16de-3ab0-4cb5-bd88-1be30d81b26b/diskattachments/9c7ad0b3-fbf1-4733-9ae9-aa746ee4773d body:<disk_attachment>
    <interface>virtio_scsi</interface>
    <disk>
        <alias>new_direct_lun_5918</alias>
        <sgio>disabled</sgio>
        <shareable>true</shareable>
    </disk>
</disk_attachment>
 
2019-06-27 17:42:29,083 - MainThread - diskattachments - INFO - Using Correlation-Id: diskattachments_update_b21330b1-29c4-419a
2019-06-27 17:42:29,522 - MainThread - diskattachments - DEBUG - Cleaning Correlation-Id: diskattachments_update_b21330b1-29c4-419a
2019-06-27 17:42:29,523 - MainThread - diskattachments - DEBUG - Response code is valid: [200, 201] 
2019-06-27 17:42:29,524 - MainThread - diskattachments - DEBUG - Response body for PUT request is: 
<disk_attachment href="/ovirt-engine/api/vms/28eb16de-3ab0-4cb5-bd88-1be30d81b26b/diskattachments/9c7ad0b3-fbf1-4733-9ae9-aa746ee4773d" id="9c7ad0b3-fbf1-4733-9ae9-aa746ee4773d">
    <active>true</active>
    <bootable>false</bootable>
    <interface>virtio_scsi</interface>
    <pass_discard>false</pass_discard>
    <read_only>false</read_only>
    <uses_scsi_reservation>false</uses_scsi_reservation>
    <disk href="/ovirt-engine/api/disks/9c7ad0b3-fbf1-4733-9ae9-aa746ee4773d" id="9c7ad0b3-fbf1-4733-9ae9-aa746ee4773d"/>
    <vm href="/ovirt-engine/api/vms/28eb16de-3ab0-4cb5-bd88-1be30d81b26b" id="28eb16de-3ab0-4cb5-bd88-1be30d81b26b"/>
</disk_attachment>

Comment 6 errata-xmlrpc 2019-08-12 11:53:28 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/RHEA-2019:2431


Note You need to log in before you can comment on or make changes to this bug.