Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2097332

Summary: Fix ansible-lint 6.0.0 for disaster_recovery and remove_stale_lun
Product: [oVirt] ovirt-ansible-collection Reporter: Martin Necas <mnecas>
Component: disaster-recoveryAssignee: Pavel Bar <pbar>
Status: CLOSED CURRENTRELEASE QA Contact: sshmulev
Severity: high Docs Contact:
Priority: high    
Version: 2.0.3CC: ahadas, bugs, mperina, sfishbai
Target Milestone: ovirt-4.5.2Keywords: CodeChange, ZStream
Target Release: 2.1.1Flags: mperina: ovirt-4.5+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-ansible-collection-2.2.0-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-30 08:47:42 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 Martin Necas 2022-06-15 13:18:19 UTC
Description of problem:
ovirt-ansible-collection has moved to the latest ansible-lint but some roles do not match the requirements.


How reproducible:
Run latests ansible-lint on roles/disaster_recovery roles/remove_stale_lun


Steps to Reproduce:
1. Install ansible-lint (`pip3 install ansible-lint`)
2. Run `ansible-lint roles/disaster_recovery roles/remove_stale_lun`

Actual results:
Multiple issues with the role.

Expected results:
Pass all lint tests.

Comment 1 Pavel Bar 2022-07-11 11:15:34 UTC
Steps to test:
1. Install "ansible-lint":
  $ pip3 install ansible-lint
2. Move to the folder where Ansible Collections is installed, probably on QE machines:
  $ cd /usr/share/ansible/collections/ansible_collections/ovirt/ovirt/
3. Run "ansible-lint":
  $ ansible-lint roles/disaster_recovery roles/remove_stale_lun

Note: if working with sources received from github, need instead of step #2 to build the project:
  $ ./build.sh build ovirt ~/.ansible/collections
  $ cd ~/.ansible/collections/ansible_collections/ovirt/ovirt

Expected "ansible-lint" result:
  Finished with 0 failure(s), 26 warning(s)...

Warnings are OK for now, should be muted by one of the mnecas future PRs.

Comment 2 Martin Necas 2022-08-04 13:12:18 UTC
To get the latest ansible-lint you need to have python 3.9 or above.

Comment 3 sshmulev 2022-08-07 12:13:06 UTC
Verified successfully.

Versions:
ovirt-ansible-collection-2.2.1-1.el8ev.noarch
ovirt-engine-4.5.2.1-0.1.el8ev.noarch
vdsm-4.50.2.2-1.el8ev

Results as expected:
"Finished with 0 failure(s), 26 warning(s) on 53 files."

Comment 4 Pavel Bar 2022-08-07 15:22:39 UTC
The warnings were also fixed by Martin Neca's PR: https://github.com/oVirt/ovirt-ansible-collection/pull/574

Checked on my environment.
Before Martin Neca's PR:
$ ansible-lint roles/disaster_recovery roles/remove_stale_lun
...
Finished with 0 failure(s), 26 warning(s) on 62 files.
$

After Martin Neca's PR - empty result (no errors/warnings):
$ ansible-lint roles/disaster_recovery roles/remove_stale_lun
$

Comment 5 Sandro Bonazzola 2022-08-30 08:47:42 UTC
This bugzilla is included in oVirt 4.5.2 release, published on August 10th 2022.
Since the problem described in this bug report should be resolved in oVirt 4.5.2 release, it has been closed with a resolution of CURRENT RELEASE.
If the solution does not work for you, please open a new bug report.