Bug 1906143 - CBO supports log levels
Summary: CBO supports log levels
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Bare Metal Hardware Provisioning
Version: 4.7
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.7.0
Assignee: Angus Salkeld
QA Contact: Sasha Smolyak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-09 18:15 UTC by sdasu
Modified: 2021-02-24 15:42 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: cluster-baremetal-operator uses the incorrect logging library Consequence: the command line arguments are not consistent with other Operators and not all kubernetes library logs will get out. Fix: switch the logging library. Result: consistent command line arguments and better diagnostic logging.
Clone Of:
Environment:
Last Closed: 2021-02-24 15:41:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-baremetal-operator pull 98 0 None closed bug 1906143: Use k8s.io/klog instead of zap 2021-02-15 13:02:30 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:42:08 UTC

Description sdasu 2020-12-09 18:15:19 UTC
Description of problem:
We are using the zap logging library, and passing a logger to the controller-runtime. Then we use calls like `r.Log.V(1).Info(...)` to emit messages. There is some question about whether those messages are going to make it to normal log output, since the default verbosity is `0`.

We also don't provide a command line option to control the log level. We should be able to have a default of 1 and provide other levels using, for example `-v=4`.

Other kubernetes libraries use k8s.io/klog/v2 and may be using logging calls that don't comply with how we configure logging. We may therefore be losing information when those log messages are not printed. We should replace zap with klog.

Options

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 5 errata-xmlrpc 2021-02-24 15:41:51 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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), 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/RHSA-2020:5633


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