Bug 1928392 - When running openstack complete, logs line are showing up
Summary: When running openstack complete, logs line are showing up
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-openstackclient
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: z2
: 16.2 (Train on RHEL 8.4)
Assignee: OSP Team
QA Contact: nlevinki
URL:
Whiteboard:
Depends On:
Blocks: 1470718
TreeView+ depends on / blocked
 
Reported: 2021-02-13 16:48 UTC by David Vallee Delisle
Modified: 2022-03-23 22:10 UTC (History)
11 users (show)

Fixed In Version: python-openstackclient-4.0.2-2.20210719124816.54bf2c0.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-23 22:10:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
RDO 31302 0 None None None 2021-03-29 13:56:17 UTC
Red Hat Issue Tracker OSP-1486 0 None None None 2022-01-28 15:49:18 UTC
Red Hat Product Errata RHBA-2022:1001 0 None None None 2022-03-23 22:10:32 UTC

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


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