Bug 2012135

Summary: [RFE] Provide option to unmap multiple LUNs using ovirt_remove_stale_lun ansible role
Product: Red Hat Enterprise Virtualization Manager Reporter: nijin ashok <nashok>
Component: ovirt-ansible-collectionAssignee: Vojtech Juranek <vjuranek>
Status: CLOSED ERRATA QA Contact: Amit Sharir <asharir>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.4.8CC: ahadas, apinnick, ddacosta, gveitmic, lsvaty, mperina
Target Milestone: ovirt-4.4.10Keywords: FutureFeature, Rebase
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-ansible-collection-1.6.6 Doc Type: Enhancement
Doc Text:
Previously, multiple stale LUNs had to be removed individually, after removing a storage domain, by calling the 'ovirt_remove_stale_lun' Ansible role multiple times. In the current release, multiple LUN WWIDs for stale links can be included in the 'ovirt_remove_stale_lun' role, which only needs to be called once.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-02-08 10:07:34 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:

Description nijin ashok 2021-10-08 11:32:34 UTC
Description of problem:

As of now, if a user has to automate the removal of multiple LUNs, they have to run the playbook which uses ovirt_remove_stale_lun multiple times. There are some cases where the user has to unmap a huge number of LUNs(like during a DR drill activity) and this would take time if it's a large environment with many hosts.

So having the option to pass multiple LUNs to ovirt_remove_stale_lun will help to delete the LUNs faster and efficiently from all the hosts.

Comment 2 Eyal Shenitzky 2021-11-04 07:29:24 UTC
The Ansible role to remove the stale LUN can be wrapped and used in a loop that provides the needed LUNs.
We do not have the capacity for enhancing it beyond basic usage.

Comment 3 Vojtech Juranek 2021-11-04 07:41:41 UTC
This was already implemented by nijin here: https://github.com/oVirt/ovirt-ansible-collection/commit/cb455ab92f87c5383ce1f75d260a94f2c8d4af11
Adding doc text and moving to modified.

Comment 5 Amit Sharir 2021-11-17 13:04:18 UTC
Can you please supply the verification flow that is required in order to verify this bug? 
We want a flow that will resemble the most to the flow the customer used.

To be more specific - please update on the following:
1. How to create the stale luns in the setup of the test.
2. Where the ansible script was executed from on the customer side (from the engine?).
3. Does the customer modify the ansible script in some way before running it?
4. The relevant commands that were used in the process/flow.

Thanks.

Comment 7 nijin ashok 2021-11-18 03:35:30 UTC
(In reply to Amit Sharir from comment #5)
> Can you please supply the verification flow that is required in order to
> verify this bug? 
> We want a flow that will resemble the most to the flow the customer used.
> 
> To be more specific - please update on the following:
> 1. How to create the stale luns in the setup of the test.

You can try to remove any LUNs that are mapped to hosts which are not used by the storage domain or VM.


> 2. Where the ansible script was executed from on the customer side (from the
> engine?).

engine.

> 3. Does the customer modify the ansible script in some way before running it?

No

> 4. The relevant commands that were used in the process/flow.

Used the example yml https://github.com/oVirt/ovirt-ansible-collection/blob/master/roles/remove_stale_lun/examples/remove_stale_lun.yml and changed the values to match with the environment.


> 
> Thanks.

Comment 15 Amit Sharir 2021-12-28 09:52:26 UTC
Following #c9 and #c13, moving to verified.

Comment 19 errata-xmlrpc 2022-02-08 10:07:34 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 (RHV Engine and Host Common Packages [ovirt-4.4.10]), 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-2022:0463