-
Bug
-
Resolution: Done
-
Normal
-
None
-
None
-
Quality / Stability / Reliability
-
False
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
This is to test User Story Hive-1581. The following problems were met during the testing:
1)To export Hive metrics, only need to set HiveConfig.spec.exportMetrics, no need to enable monitoring for user-defined projects
2) when HiveConfig.spec.“exportMetrics: true” was removed or changed to “exportMetrics: false”, the resources for exporting metrics were still there and Hive metrics can be still queried from OCP web-console.
Version-Release number of selected component (if applicable):
OCP:4.9.0-0.nightly-2021-09-23-1422414.9.0-0.nightly-2021-09-23-1422414
HIVE: IMG=quay.io/lwan0/hive:c0e9a5b
How reproducible:
Always
Steps to Reproduce:
- Create a Hive cluster
- Configure HiveConfig.spec.exportMetrics: true
- Wait for the resources (role, rolebinding, servicemonitor) are created for exporting the Hive metrics
- The hive metrics can be queried on OCP web-console
- Configure HiveConfig.spec and remove “exportMetrics: true” or changed to “exportMetrics: false”
- Check the resources (role, rolebinding, servicemonitor) are still there
- The hive metrics can still be queried on OCP web-console
Actual results:
- The Hive metrics can be exported without enabling monitoring for user-defined projects
- In Step 6,7 of Reproduce, the resources are still there and Hive metrics can still be queried from OCP web-console
jianpingshu@jshu-mac hive % oc get role -n hive
NAME CREATED AT
prometheus-k8s 2021-09-24T12:03:30Z
jianpingshu@jshu-mac hive % oc get rolebinding -n hive
NAME ROLE AGE
prometheus-k8s Role/prometheus-k8s 73m
system:deployers ClusterRole/system:deployer 76m
system:image-builders ClusterRole/system:image-builder 76m
system:image-pullers ClusterRole/system:image-puller 76m
jianpingshu@jshu-mac hive % oc get servicemonitor -n hive
NAME AGE
hive-clustersync 73m
hive-controllers 73m
Expected results:
- https://github.com/openshift/hive/blob/master/docs/monitoring.md, the document shall be updated if enabling monitoring for user-defined projects is not needed for Hive to export metrics
- In step 6,7 of Reproduce, the resources shall be cleared if HiveConfig.spec.exportMetric is removed or set to “false”. Hive metrics shall not be queried from OCP web-console in that case.
Additional info: