You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically, we propose to use ERROR logs that report erroneous user input when rejecting them. In principle, any errors should be logged with ERROR (user error is no exception). Currently, INFO logs are used which makes it very difficult to identify those errors from a large number of INFO logs.
We carefully go over all the log statement related to user inputs and revise the log level in the PR.
We discovered that many error messages related to invalid input are printed via klog.Infof (for example, code) instead of klog.Errorf, while the messages themselves should be raised at the ERROR level.
The error messages we got that were printed at the INFO level include (but are not limited to):
Deployment.apps "test-cluster-discovery" is invalid: spec.template.spec.dnsConfig.nameservers[0]: Invalid value: "MyIPAddress": must be valid IP address, requeuing
Deployment.apps "test-cluster-discovery" is invalid: spec.template.spec.containers[0].volumeMounts[0].name: Not found: "Volume", requeuing
Deployment.apps "test-cluster-discovery" is invalid: [spec.template.spec.containers[0].resources.limits[MyType]: Invalid value: "MyType": must be a standard resource type or fully qualified
What did you expect to see?
We expect to see the error messages printed at the ERROR level, as all the messages we show above are indeed errors.
What did you see instead?
These messages are shown at the INFO level in the log.
Additional comment
We inspected the source code and we believe that this line should use klog.Errorf rather than klog.Infof to print the log message.
The text was updated successfully, but these errors were encountered:
The PR can be found at #4685.
Basically, we propose to use ERROR logs that report erroneous user input when rejecting them. In principle, any errors should be logged with ERROR (user error is no exception). Currently, INFO logs are used which makes it very difficult to identify those errors from a large number of INFO logs.
We carefully go over all the log statement related to user inputs and revise the log level in the PR.
Bug Report
What version of Kubernetes are you using?
What version of TiDB Operator are you using?
What storage classes exist in the Kubernetes cluster and what are used for PD/TiKV pods?
$ kubectl get sc NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE standard (default) rancher.io/local-path Delete WaitForFirstConsumer false 9m4s $ kubectl get pvc -n {tidb-cluster-namespace} NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE pd-advanced-tidb-pd-0 Bound pvc-5d85aab1-3a5b-4bd2-a096-83be8a6e4c63 10Gi RWO standard 8m37s pd-advanced-tidb-pd-1 Bound pvc-22015e6c-601d-409e-b480-07458ce53711 10Gi RWO standard 8m37s pd-advanced-tidb-pd-2 Bound pvc-aa1bfdda-b2be-44ed-a721-a17ef5d6140c 10Gi RWO standard 8m37s tikv-advanced-tidb-tikv-0 Bound pvc-a702225b-1b7f-4363-8975-04f9170f5853 100Gi RWO standard 7m11s tikv-advanced-tidb-tikv-1 Bound pvc-fc633404-97d4-4359-9921-61faaf26b4c8 100Gi RWO standard 7m11s tikv-advanced-tidb-tikv-2 Bound pvc-69b6c9eb-6dcf-4ae6-91b8-912551c3c1d4 100Gi RWO standard 7m11s
What's the status of the TiDB cluster pods?
What did you do?
We discovered that many error messages related to invalid input are printed via
klog.Infof
(for example, code) instead ofklog.Errorf
, while the messages themselves should be raised at theERROR
level.The error messages we got that were printed at the
INFO
level include (but are not limited to):What did you expect to see?
We expect to see the error messages printed at the
ERROR
level, as all the messages we show above are indeed errors.What did you see instead?
These messages are shown at the
INFO
level in the log.Additional comment
We inspected the source code and we believe that this line should use
klog.Errorf
rather thanklog.Infof
to print the log message.The text was updated successfully, but these errors were encountered: