-
Bug
-
Resolution: Done-Errata
-
Major
-
Logging 5.8.z, Logging 5.9.z
-
False
-
None
-
False
-
NEW
-
VERIFIED
-
-
Bug Fix
-
-
-
Log Collection - Sprint 255
-
Low
Description of problem:
if `.spec.visualization.ocpConsole.timeout` is set to be an string:
$ oc get clusterlogging instance -o jsonpath='{.spec.visualization.ocpConsole}' -n openshift-logging {"timeout":"120"}
as indicated in the API DOC:
$ oc explain clusterlogging.spec.visualization.ocpConsole.timeout GROUP: logging.openshift.io KIND: ClusterLogging VERSION: v1FIELD: timeout <string>DESCRIPTION: Timeout is the max duration before a query timeout
An unmarshal error is received in the `logging-view-plugin`:
time="2024-04-11T13:35:51Z" level=error msg="unable to unmarshall config data" error="yaml: unmarshal errors:\n line 1: cannot unmarshal !!str `120` into time.Duration" module=server
Version-Release number of selected component (if applicable):
Identified in Logging 5.8 and 5.9
How reproducible:
Always
Steps to Reproduce:
- Set `clusterlogging.spec.visualization.ocpConsole.timeout` to be an string:
apiVersion: logging.openshift.io/v1 kind: ClusterLogging metadata: name: instance namespace: openshift-logging spec: collection: type: vector logStore: lokistack: name: logging-loki type: lokistack managementState: Managed visualization: ocpConsole: timeout: "120" <--- defined as an string --- OUTPUT OMMITED ---
Actual results:
An error is received in the `logging-view-plugin` leading to don't set in the OCP Console the `timeout`:
$ oc logs deployment.apps/logging-view-plugin |grep "str .* into time.Duration" time="2024-04-11T13:35:51Z" level=error msg="unable to unmarshall config data" error="yaml: unmarshal errors:\n line 1: cannot unmarshal !!str `120` into time.Duration" module=server
Expected results:
The API Docs reflects the correct type of `clusterlogging.spec.visualization.ocpConsole.timeout` at the same time that indicates the option of using s=seconds,m=minutes,h=hours,d=days.
Additional info:
Set the value of to be an integer followed of s=seconds,m=minutes,h=hours,d=days:
$ oc patch clusterlogging/instance --type='json' -p='[{"op": "replace", "path":"/spec/visualization/ocpConsole/timeout","value":120s}]'
- relates to
-
OBSDOCS-979 Document the value of clusterlogging.spec.visualization.ocpConsole.timeout
- New
- links to
-
RHSA-2024:4333 security update Logging for Red Hat OpenShift - 5.9.4
- mentioned on