Bug 1926721 - Refactoring and overall improvement of check-latest-packages-version validation
Summary: Refactoring and overall improvement of check-latest-packages-version validation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: validations-common
Version: 16.2 (Train)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 16.2 (Train on RHEL 8.4)
Assignee: Jiri Podivin
QA Contact: David Rosenfeld
URL:
Whiteboard:
: 1944079 (view as bug list)
Depends On: 1926238
Blocks: 1944079
TreeView+ depends on / blocked
 
Reported: 2021-02-09 10:45 UTC by Gaël Chamoulaud
Modified: 2021-12-24 12:33 UTC (History)
3 users (show)

Fixed In Version: validations-common-1.1.2-2.20210424004734.8d6e8d4.el8ost
Doc Type: Enhancement
Doc Text:
This enhancement improves the performance and application of the `check-latest-packages-version` validation.
Clone Of:
Environment:
Last Closed: 2021-09-15 07:11:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 774619 0 None MERGED Make check_latest_packages_version roles more generic 2021-04-26 06:59:22 UTC
Red Hat Issue Tracker OSP-1405 0 None None None 2021-12-24 12:33:11 UTC
Red Hat Issue Tracker VALFRWK-409 0 None None None 2021-08-13 05:38:48 UTC
Red Hat Product Errata RHEA-2021:3483 0 None None None 2021-09-15 07:12:21 UTC

Internal Links: 1944079

Description Gaël Chamoulaud 2021-02-09 10:45:40 UTC
This validation tests by default if the python*-tripleoclient package is not up2date on the Undercloud. That validation is hosted in validations-common which should contain non-tripleo validation.

This validation should be generic and not containing tripleo references.

Comment 4 Jiri Podivin 2021-03-29 10:19:47 UTC
*** Bug 1944079 has been marked as a duplicate of this bug. ***

Comment 5 Jiri Podivin 2021-04-26 06:58:00 UTC
Patch in build: https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1586887

Comment 9 Jiri Podivin 2021-05-21 07:37:12 UTC
You can test this by running the tripleo-latest-packages-version validation. As it wraps around this module.

Comment 10 David Rosenfeld 2021-05-24 13:43:49 UTC
Got checking a single package to work:

openstack tripleo validator run --validation check-latest-packages-version --extra-vars packages_list=openstack-tripleo-heat-templates
Running Validations without Overcloud settings.
+--------------------------------------+-------------------------------+--------+------------+----------------+-------------------+-------------+
| UUID                                 | Validations                   | Status | Host_Group | Status_by_Host | Unreachable_Hosts | Duration    |
+--------------------------------------+-------------------------------+--------+------------+----------------+-------------------+-------------+
| 6523932e-607d-4564-a5f5-254048fe6088 | check-latest-packages-version | PASSED | localhost  | localhost      |                   | 0:00:02.853 |
+--------------------------------------+-------------------------------+--------+------------+----------------+-------------------+-------------+

but couldn't get checking multiple packages to work:

openstack tripleo validator run --validation check-latest-packages-version --extra-vars packages_list=openstack-tripleo-heat-templates,openstack-tripleo-common
Expected comma separated 'key=value' pairs, but got: openstack-tripleo-common

Moving back to on_dev

Comment 11 Jiri Podivin 2021-05-24 14:48:56 UTC
Deploying the puddle on DF-5 to see if there is a way to do this without rewrite. 
Afterwards I'll update the BZ with instructions for the validation, as well as a new code (if needed).

Comment 12 Jiri Podivin 2021-05-24 16:06:52 UTC
To test the validation with multiple packages one has to supply the list of packages for the validation to check.
At this time, this can be accomplished with the `--extra-vars-file` argument, and supplying it with a yaml file containing list of the packages.

For example:
"""
---
packages_list:
 - openstack-tripleo-heat-templates
 - openstack-tripleo-common
 ...

"""

If the file is named extra_vars.yaml, the command would be, assuming the stack user on the undercloud:

`openstack tripleo validator run --validation check-latest-packages-version --extra-vars-file=extra_vars.yaml`


At this time I'm not sure how to properly supply a list trough the `--extra-vars` argument.
In my opinion it would be rather unwieldy if possible at all.

Comment 13 David Rosenfeld 2021-05-24 18:50:30 UTC
Using procedure from comment 12 with an extra-vars-file could validate multiple packages. Moving to Verified.

Comment 15 errata-xmlrpc 2021-09-15 07:11:47 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 (Red Hat OpenStack Platform (RHOSP) 16.2 enhancement 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-2021:3483


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