Bug 2001968 - Undercloud upgrade doesn't find the openstack-tripleo-validations playbooks
Summary: Undercloud upgrade doesn't find the openstack-tripleo-validations playbooks
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-tripleoclient
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: z8
: 16.1 (Train on RHEL 8.2)
Assignee: Jiri Podivin
QA Contact: nlevinki
URL:
Whiteboard:
Depends On:
Blocks: 2007556
TreeView+ depends on / blocked
 
Reported: 2021-09-07 14:59 UTC by jpateteg
Modified: 2022-03-24 11:01 UTC (History)
13 users (show)

Fixed In Version: python-tripleoclient-12.3.2-1.20210929093312.ae58329.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2007556 (view as bug list)
Environment:
Last Closed: 2022-03-24 11:01:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 808067 0 None MERGED [Stable-Only]Reversing the legacy directory conditional 2021-09-24 08:53:31 UTC
OpenStack gerrit 808068 0 None MERGED [Stable-Only]Reversing the legacy directory conditional 2021-09-24 08:53:39 UTC
OpenStack gerrit 808070 0 None MERGED [Stable-Only]Reversing the legacy directory conditional 2021-09-24 08:53:36 UTC
Red Hat Issue Tracker OSP-8271 0 None None None 2021-11-15 12:51:21 UTC
Red Hat Issue Tracker VALFRWK-607 0 None None None 2021-09-07 15:20:45 UTC
Red Hat Knowledge Base (Solution) 6321031 0 None None None 2021-09-13 09:08:42 UTC
Red Hat Product Errata RHBA-2022:0986 0 None None None 2022-03-24 11:01:31 UTC

Description jpateteg 2021-09-07 14:59:52 UTC
Description of problem:
When attepmting a minor update on the undercloud from z1 to z5 (Train) the process will fail right after start because it cannot find the validation playbooks.

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

How reproducible:
Always

Steps to Reproduce:
1. Prepare new packages for the minor update
2. run openstack undercloud upgrade command
3.

Actual results:
Process fails with the error:

An error occurred during configuration validation, please check your host configuration and try again. Error message: No such playbook: /usr/share/openstack-tripleo-validations/playbooks/undercloud-disk-space-pre-upgrade.yaml
Command '['openstack', 'undercloud', 'upgrade', '--skip-package-updates']' returned non-zero exit status 1.
Command '['openstack', 'undercloud', 'upgrade', '--skip-package-updates']' returned non-zero exit status 1.



Expected results:
Undercloud upgrade process should conclude successfully

Additional info:
The failed validated playbooks can be found at /usr/share/ansible/validation-playbooks/ can I just copy all (or link) of them as workaround to /usr/share/openstack-tripleo-validations/playbooks/ ?

Comment 1 jpateteg 2021-09-07 19:21:24 UTC
After checking deeper with the team we came across with this pieces of code:

[stack@director-rich tripleoclient]$ grep "\/usr\/share\/openstack-tripleo-validations" *

constants.py:DEFAULT_VALIDATIONS_LEGACY_BASEDIR = "/usr/share/openstack-tripleo-validations"

grep -A5 ANSIBLE_VALIDATION_DIR /usr/lib/python3.6/site-packages/tripleoclient/constants.py
ANSIBLE_VALIDATION_DIR = (
    os.path.join(DEFAULT_VALIDATIONS_LEGACY_BASEDIR, 'playbooks')
    if os.path.exists(os.path.join(DEFAULT_VALIDATIONS_LEGACY_BASEDIR,
                                   'playbooks'))
    else "/usr/share/ansible/validation-playbooks"
    )

So it looks like it search the validation playbooks first on the legacy directory, - which exists- but does not contain the playbooks.

Moving that directory /usr/share/openstack-tripleo-validations/playbooks to a different name fix the issue.

It is odd why that dir existed.

Comment 3 Jiri Podivin 2021-09-13 09:08:43 UTC
Proposed solution on the KB, entails removal of the '/usr/share/openstack-tripleo-validations' directory to ensure that VF is looking for the validations in the right place.
The solution is considered generally acceptable and sufficient by the VF squad, at least in cases where direct patch of the code isn't feasible.

Comment 4 Jiri Podivin 2021-09-13 12:20:55 UTC
All patches are now in review.

Comment 6 Jiri Podivin 2021-09-15 08:48:46 UTC
I believe it is. Conditional is the same in both 16.1 and 16.2. The directory '/usr/share/openstack-tripleo-validations' is also present on my 16.2 deployment. 
Therefore, I do believe it's probable that the same issue should affect both.

Comment 16 errata-xmlrpc 2022-03-24 11:01:10 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 16.1.8 bug fix and 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/RHBA-2022:0986


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