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

Bug 1887467

Summary: Unclosed resource warning when running validator commands
Product: Red Hat OpenStack Reporter: Cédric Jeanneret <cjeanner>
Component: python-keystoneauth1Assignee: Cédric Jeanneret <cjeanner>
Status: CLOSED ERRATA QA Contact: Jeremy Agee <jagee>
Severity: medium Docs Contact:
Priority: medium    
Version: 16.1 (Train)CC: apevec, gchamoul, hbrock, jschluet, jslagle, lhh, mburns
Target Milestone: z3Keywords: Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-keystoneauth1-3.17.3-0.20200714091828.7d7b956.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-15 18:37:08 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:

Description Cédric Jeanneret 2020-10-12 14:37:23 UTC
Description of problem:
We have some garbage when running validator commands, such as:

/usr/lib/python3.6/site-packages/validations_libs/ansible.py:374: ResourceWarning: unclosed file <_io.BufferedWriter name='/var/log/validations/artifacts/e8542ac7-5a69-4a6c-a8e7-0057bcb97d24_undercloud-tokenflush.yaml_2020-10-10T23:03:25.444907Z/artifacts/stdout'>

sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.24.2', 34144), raddr=('192.168.24.2', 13000)>

Version-Release number of selected component (if applicable):
python3-validations-libs-1.0.5-1.20200914174429.4a660ec.el8ost.noarch

How reproducible:
Always


Steps to Reproduce:
1. run `openstack tripleo validator' command (any sub-command)
2.
3.

Actual results:
We get some extra logs about unclosed buffers/files

Expected results:
We should only get the actual command output

Additional info:

Comment 2 Cédric Jeanneret 2020-11-02 12:39:00 UTC
This issue is partially masked with the patch associated to https://bugzilla.redhat.com/show_bug.cgi?id=1892323

It basically means the issue is located in the authentication part, either ocs-libs or keystoneauth1 (and I would tend to point that later one as the main culprit).
Since this issue isn't seen upstream, it's probably a missing backport. Time to chase it down I guess.

Comment 3 Cédric Jeanneret 2020-11-02 12:54:07 UTC
Apparently we're missing this change in stable/train, therefore in osp-16.1:
https://review.opendev.org/#/c/674139/

Let's backport it then!

Comment 15 errata-xmlrpc 2020-12-15 18:37:08 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.3 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/RHEA-2020:5413