Bug 1928392

Summary: When running openstack complete, logs line are showing up
Product: Red Hat OpenStack Reporter: David Vallee Delisle <dvd>
Component: python-openstackclientAssignee: OSP Team <rhos-maint>
Status: CLOSED ERRATA QA Contact: nlevinki <nlevinki>
Severity: low Docs Contact:
Priority: low    
Version: 16.1 (Train)CC: apevec, cjeanner, jjoyce, jpichon, jschluet, jslagle, kecarter, lhh, ramishra, slinaber, tvignaud
Target Milestone: z2Keywords: Triaged
Target Release: 16.2 (Train on RHEL 8.4)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-openstackclient-4.0.2-2.20210719124816.54bf2c0.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-23 22:10: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:
Bug Depends On:    
Bug Blocks: 1470718    

Description David Vallee Delisle 2021-02-13 16:48:08 UTC
Description of problem:
This breaks the functionnality of being able to generate the bash completion file automatically

(undercloud) [stack@undercloud-0 ~]$ openstack complete | sudo tee /etc/bash_completion.d/openstack.bash_completion
2021-02-13 16:44:00.742 614866 DEBUG osc_lib.clientmanager [-] No service catalog is_service_available /usr/lib/python3.6/site-packages/osc_lib/clientmanager.py:229ESC[00m
_openstack()
{
  local cur prev words
  COMPREPLY=()
  _get_comp_words_by_ref -n : cur prev words

  # Command data:
[...]
2021-02-13 16:45:59.437 614866 INFO osc_lib.shell [-] END return value: 0ESC[00m


Version-Release number of selected component (if applicable):
python3-tripleoclient-12.3.2-1.20201114043243.el8ost.noarch
python3-osc-lib-1.14.1-1.20201113114517.a0d9746.el8ost.noarch

Comment 1 Cédric Jeanneret 2021-02-15 10:55:04 UTC
Hello,

seems to be a DEBUG output - did you configure anything with debug?

Cheers,

C.

Comment 2 James Slagle 2021-02-17 22:45:46 UTC
it's not DEBUG output, it's INFO.  logger must be incorrectly configured.

Comment 3 David Vallee Delisle 2021-02-18 02:07:03 UTC
Yup one line is debug, other one is info.

Also, because of the nature of the command which is meant to be redirected into a file, we shouldn't even report debug unless --debug is passed I believe.

We could probably add a --output to redirect into a file as well if we don't want to wiggle with the logger and we believe these logs can be useful.


Thanks,

DVD

Comment 4 Kevin Carter 2021-03-29 13:55:21 UTC
While this is a workaround, you could do the following:

  $ openstack complete | sed -n '/_openstack/,$p' | tee /etc/bash_completion.d/openstack.bash_completion

This would create the bash completion file correctly without having to worry about superfluous output. In testing a solution in master, we've found that the issue remains, even though the is no longer log line related. We'll work with the upstream to see what can be done, and I'll update my RDO review to automatically create the completion file accordingly.

Comment 6 Alex Schultz 2021-10-07 20:28:43 UTC
This will be available in 16.2

Comment 18 errata-xmlrpc 2022-03-23 22:10: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 (Release of components for Red Hat OpenStack Platform 16.2.2), 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:1001