Bug 1959853

Summary: 16.2 Validation local variable referenced before assignment traceback
Product: Red Hat OpenStack Reporter: David Rosenfeld <drosenfe>
Component: python-tripleoclientAssignee: Jiri Podivin <jpodivin>
Status: CLOSED ERRATA QA Contact: David Rosenfeld <drosenfe>
Severity: high Docs Contact:
Priority: high    
Version: 16.2 (Train)CC: gchamoul, hbrock, jslagle, mburns
Target Milestone: rcKeywords: Triaged
Target Release: 16.2 (Train on RHEL 8.4)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-tripleoclient-12.5.1-2.20210514084806.0a0296f.el8ost Doc Type: Bug Fix
Doc Text:
Before this update, the validation variable in one code path was referenced but never assigned, which resulted in an unhandled exception during validation. This has been fixed.
Story Points: ---
Clone Of:
: 1959866 (view as bug list) Environment:
Last Closed: 2021-09-15 07:14:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1959866    

Description David Rosenfeld 2021-05-12 13:31:40 UTC
Description of problem: Have seen a traceback during OSP 16.2 validation execution for two validations - ceph-health and ovs-dpdk-pmd-cpus-check

openstack tripleo validator run --validation ceph-health
Running Validations without Overcloud settings.
Exception occured while running the command
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/tripleoclient/command.py", line 32, in run
    super(Command, self).run(parsed_args)
  File "/usr/lib/python3.6/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python3.6/site-packages/cliff/command.py", line 185, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/tripleo_validator.py", line 472, in take_action
    self._run_validator_run(parsed_args)
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/tripleo_validator.py", line 467, in _run_validator_run
    if is_failed_validation:
UnboundLocalError: local variable 'is_failed_validation' referenced before assignment
local variable 'is_failed_validation' referenced before assignment



Version-Release number of selected component (if applicable): RHOS-16.2-RHEL-8-20210511.n.0


How reproducible: Every time


Steps to Reproduce:
1. Execute either openstack tripleo validator run --validation ceph-health or openstack tripleo validator run --validation ovs-dpdk-pmd-cpus-check
2.
3.

Actual results: Traceback is seen when validation is executed.


Expected results: No traceback should be seen


Additional info:

Comment 7 David Rosenfeld 2021-06-15 13:54:09 UTC
No traceback is seen for either of the BZs listed in the description:

openstack tripleo validator run --validation ceph-health
Running Validations without Overcloud settings.
+--------------------------------------+-------------+--------+------------+------------------------------------------+-------------------+-------------+
| UUID                                 | Validations | Status | Host_Group | Status_by_Host                           | Unreachable_Hosts | Duration    |
+--------------------------------------+-------------+--------+------------+------------------------------------------+-------------------+-------------+
| a378f2e0-778b-4c1d-8459-1939355790c2 | ceph-health | PASSED | ceph_mon   | controller-0, controller-1, controller-2 |                   | 0:00:07.815 |
+--------------------------------------+-------------+--------+------------+------------------------------------------+-------------------+-------------+


openstack tripleo validator run --validation ovs-dpdk-pmd-cpus-check
Running Validations without Overcloud settings.

Comment 9 errata-xmlrpc 2021-09-15 07:14:40 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