Bug 1889473

Summary: Kube-apiserver loglevel set to Normal but still it logs the TRACE level logs
Product: OpenShift Container Platform Reporter: Shivkumar Ople <sople>
Component: kube-apiserverAssignee: Venkata Siva Teja Areti <vareti>
Status: CLOSED NOTABUG QA Contact: Ke Wang <kewang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.4CC: aos-bugs, mfojtik, xxia
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-21 19:52:24 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:

Description Shivkumar Ople 2020-10-19 18:07:13 UTC
Description of problem:

Kube-apiserver is patched with the below command to set the log level as 'Normal', but still the kube-apiserver logs shows TRACE level messages.


#oc patch kubeapiserver.operator/cluster --type=json -p '[{"op": "replace", "path": "/spec/logLevel", "value": "Normal" }]'


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



How reproducible:
Always

Steps to Reproduce:
1.Patch the kube-apiserver. 
#oc patch kubeapiserver.operator/cluster --type=json -p '[{"op": "replace", "path": "/spec/logLevel", "value": "Normal" }]'

2.Check the logs once the kube-apiserver pod rolled out.
3.It shows some TRACE level messages.



Actual results:
Showing Trace level messages, which consumes more space for logging trace level messages

Expected results:
Should not show the Trace level messages

Additional info:

Comment 2 Venkata Siva Teja Areti 2020-10-21 19:52:24 UTC
I am not able to reproduce this in a 4.4 cluster.

"TRACE" in the log message here should not be confused with log levels. These messages are dumped by utility named tracer inside kube-apiserver.

"Normal", "Debug", "Trace", "TraceAll" have verbosity levels of 2, 4, 6, 8. Verbosity level kube-apiserver is using can be confirmed from the command line options printed to the log output.