Bug 2097332 - Fix ansible-lint 6.0.0 for disaster_recovery and remove_stale_lun
Summary: Fix ansible-lint 6.0.0 for disaster_recovery and remove_stale_lun
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-ansible-collection
Classification: oVirt
Component: disaster-recovery
Version: 2.0.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.5.2
: 2.1.1
Assignee: Pavel Bar
QA Contact: sshmulev
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-15 13:18 UTC by Martin Necas
Modified: 2022-08-30 08:47 UTC (History)
4 users (show)

Fixed In Version: ovirt-ansible-collection-2.2.0-1
Clone Of:
Environment:
Last Closed: 2022-08-30 08:47:42 UTC
oVirt Team: Storage
Embargoed:
mperina: ovirt-4.5+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github oVirt ovirt-ansible-collection pull 543 0 None Merged Fix 'ansible-lint' violations for 'disaster_recovery' role (part 1 - 'yamllint' warnings) 2022-07-04 08:57:27 UTC
Github oVirt ovirt-ansible-collection pull 554 0 None Merged Fix 'ansible-lint' violations for 'disaster_recovery' & 'remove_stale_lun' roles 2022-07-04 17:04:08 UTC
Github oVirt ovirt-ansible-collection pull 574 0 None Merged Add ansible-lint config 2022-08-07 15:23:29 UTC
Red Hat Issue Tracker RHV-46432 0 None None None 2022-06-15 13:28:25 UTC

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.


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