-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
4.14
-
None
-
Moderate
-
No
-
MON Sprint 249
-
1
-
Rejected
-
False
-
Description of problem:
openshift-state-metrics has logic to generate metrics for builds/buildconfigs. That logic will fail when the buildconfig (or any other collector component for that matter) capability is disabled and the api does not exist. see: https://github.com/openshift/openshift-state-metrics/blob/774cb2ff4b9e21c452650643528c6fa190c7885a/main.go#L65-L70 https://github.com/openshift/openshift-state-metrics/blob/774cb2ff4b9e21c452650643528c6fa190c7885a/pkg/collectors/build_config.go#L108-L136 https://github.com/openshift/openshift-state-metrics/blob/774cb2ff4b9e21c452650643528c6fa190c7885a/pkg/collectors/build.go#L175-L188
Version-Release number of selected component (if applicable):
4.14
How reproducible:
always
Steps to Reproduce:
1. oc logs -c openshift-state-metrics openshift-state-metrics-8d8965fc7-r6kcz -n openshift-monitoring | grep build.openshift
Actual results:
errors in the openshift state metrics container logs due to non-existent api endpoint E1012 01:32:59.190721 1 reflector.go:138] github.com/openshift/openshift-state-metrics/pkg/collectors/builder.go:228: Failed to watch *v1.BuildConfig: failed to list *v1.BuildConfig: the server could not find the requested resource (get buildconfigs.build.openshift.io) E1012 01:33:00.591096 1 reflector.go:138] github.com/openshift/openshift-state-metrics/pkg/collectors/builder.go:228: Failed to watch *v1.Build: failed to list *v1.Build: the server could not find the requested resource (get builds.build.openshift.io)
Expected results:
no errors in the log related to the missing build, buildconfig, or DeploymentConfig APIs
Note: this bug needs the same fix as https://issues.redhat.com/browse/OCPBUGS-20438 to make openshift state metrics aware of which caps are enabled on the cluster.
- is blocked by
-
MON-2923 Deprecate OSM
- To Do
- is related to
-
OCPBUGS-20438 DeploymentConfig metrics should not be gathered when capability is disabled
- Closed