Bug 2004018

Summary: Modify ovirt_disk Ansible module to allow setting the bootable flag only if disk is attached to a virtual machine
Product: Red Hat Enterprise Virtualization Manager Reporter: Sam Wachira <swachira>
Component: ovirt-ansible-collectionAssignee: Martin Necas <mnecas>
Status: CLOSED ERRATA QA Contact: Barbora Dolezalova <bdolezal>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4.7CC: emarcus, mavital, mperina
Target Milestone: ovirt-4.5.0Keywords: ZStream
Target Release: 4.5.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-ansible-collection-2.0.0 Doc Type: Enhancement
Doc Text:
With this release, an error message has been added to the ovirt_disk module, warning that the parameters 'interface', 'activate', 'bootable', 'uses_scsi_reservation' and 'pass_discard' cannot be used without specifying a VM.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-26 17:25:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sam Wachira 2021-09-14 10:56:27 UTC
Description of problem:
- The ovirt_disk Ansible module allows you to define the 'bootable' parameter and run in playbooks regardless of whether the disk is attached to a virtual machine or not.
- In a scenario where a new disk is created but not attached to a virtual machine and 'bootable: true', the playbook run is successful. However, the 'bootable' flag is not set.

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


How reproducible:
Fully

Steps to Reproduce:
Using ovirt_disk Ansible module,
1. Create new disk with 'bootable: true' and not attached to VM.

Actual results:
Disk is created and 'bootable' flag is not set.

Expected results:
Playbook run should display warning or fail if the disk is not attached to a virtual machine and contains 'bootable: true'

Additional info:
- Only disks attached to a virtual machine can have the bootable flag set in RHV.
- Documentation for the 'bootable' parameter needs to be updated to include this information (https://console.redhat.com/ansible/automation-hub/repo/published/redhat/rhv/content/module/ovirt_disk)

Comment 4 Barbora Dolezalova 2022-05-11 12:22:59 UTC
Verified in ovirt-ansible-collection-2.0.3-1.el8ev.noarch

Expected results met: [WARNING]: Cannot use 'interface', 'activate', 'bootable', 'uses_scsi_reservation' or 'pass_discard' without specifing VM.

Comment 9 errata-xmlrpc 2022-05-26 17:25:09 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 (Moderate: RHV Engine and Host Common Packages security 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-2022:4712

Comment 10 meital avital 2022-08-03 07:27:58 UTC
Due to QE capacity, we are not going to cover this issue in our automation