Barbicanclient CLI is too chatty

Bug #1681966 reported by Arun Kant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-barbicanclient
Fix Released
Undecided
Jeremy Liu

Bug Description

Currently when using barbicanclient CLI, it always logs message in DEBUG mode. This creates problem when certain tooling script is expecting only certain response text in output. Please see following output of listing barbican secrets. Error message can be disregarded for purpose of this bug as its NOT related to reported behavior in CLI.

(venv) arun@arun-hp-z620-ws:~/myFolder/myWork/openstack/python-barbicanclient$ vi ~/barbican.osrc
(venv) arun@arun-hp-z620-ws:~/myFolder/myWork/openstack/python-barbicanclient$ source ~/barbican.osrc
(venv) arun@arun-hp-z620-ws:~/myFolder/myWork/openstack/python-barbicanclient$ barbican secret list
WARNING:barbicanclient.barbican:This Barbican CLI interface has been deprecated and will be removed in the O release. Please use the openstack unified client instead.
DEBUG:stevedore.extension:found extension EntryPoint.parse('table = cliff.formatters.table:TableFormatter')
DEBUG:stevedore.extension:found extension EntryPoint.parse('json = cliff.formatters.json_format:JSONFormatter')
DEBUG:stevedore.extension:found extension EntryPoint.parse('csv = cliff.formatters.commaseparated:CSVLister')
DEBUG:stevedore.extension:found extension EntryPoint.parse('value = cliff.formatters.value:ValueFormatter')
DEBUG:stevedore.extension:found extension EntryPoint.parse('yaml = cliff.formatters.yaml_format:YAMLFormatter')
DEBUG:barbicanclient.client:Creating Client object
DEBUG:barbicanclient.secrets:Listing secrets - offset 0 limit 10
DEBUG:keystoneauth.identity.v3.base:Making authentication request to http://192.168.245.13:35357/v3/auth/tokens
DEBUG:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 192.168.245.13
ERROR:barbican:Unable to establish connection to http://192.168.245.13:35357/v3/auth/tokens: ('Connection aborted.', BadStatusLine("''",))
Unable to establish connection to http://192.168.245.13:35357/v3/auth/tokens: ('Connection aborted.', BadStatusLine("''",))

I believe this unintended behavior was added by this change (https://review.openstack.org/#/c/311138/) which exposed issue in cliff library where it sets DEBUG log level (https://github.com/openstack/cliff/blob/master/cliff/app.py#L204).

Arun Kant (arukant)
summary: - Barbicanclient is too chatty
+ Barbicanclient CLI is too chatty
Arun Kant (arukant)
description: updated
Arun Kant (arukant)
description: updated
Jeremy Liu (liujiong)
Changed in python-barbicanclient:
assignee: nobody → Jeremy Liu (liujiong)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-barbicanclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/553722

Changed in python-barbicanclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-barbicanclient (master)

Reviewed: https://review.openstack.org/553722
Committed: https://git.openstack.org/cgit/openstack/python-barbicanclient/commit/?id=a6ac975f7786052c73fb970c0420d956b2852e6e
Submitter: Zuul
Branch: master

commit a6ac975f7786052c73fb970c0420d956b2852e6e
Author: Jeremy Liu <email address hidden>
Date: Fri Mar 16 17:09:35 2018 +0800

    Supress client debug messages

    cliff sets log level to DEBUG in `run` function [1], need to overwrite
    this configuration to depress DEBUG messages. This patch adds such
    configuration in `prepare_to_run_command` function which will be called
    by cliff after it sets log level to DEBUG [2][3].

    [1] https://github.com/openstack/cliff/blob/master/cliff/app.py#L248
    [2] https://github.com/openstack/cliff/blob/master/cliff/app.py#L279
    [3] https://github.com/openstack/cliff/blob/master/cliff/app.py#L393

    Change-Id: I5c270d74cb09e90b8a98fd8febf587b98db2306f
    Closes-bug: #1681966

Changed in python-barbicanclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-barbicanclient 4.7.0

This issue was fixed in the openstack/python-barbicanclient 4.7.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-barbicanclient queens-eol

This issue was fixed in the openstack/python-barbicanclient queens-eol release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.