Bug 1906143

Summary: CBO supports log levels
Product: OpenShift Container Platform Reporter: sdasu
Component: Bare Metal Hardware ProvisioningAssignee: Angus Salkeld <asalkeld>
Bare Metal Hardware Provisioning sub component: cluster-baremetal-operator QA Contact: Sasha Smolyak <ssmolyak>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: low CC: aos-bugs, asalkeld, kquinn, rbartal
Version: 4.7Keywords: Triaged
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 15:41:51 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:

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