Uploaded image for project: 'OpenShift Hive'
  1. OpenShift Hive
  2. HIVE-1655

HiveConfig.spec.exportMetrics can’t be disabled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal 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:

      1. Create a Hive cluster  
      2. Configure HiveConfig.spec.exportMetrics: true
      3. Wait for the resources (role, rolebinding, servicemonitor) are created for exporting the Hive metrics
      4. The hive metrics can be queried on OCP web-console
      5. Configure HiveConfig.spec and remove “exportMetrics: true” or changed to “exportMetrics: false”
      6. Check the resources (role, rolebinding, servicemonitor) are still there
      7. The hive metrics can still be queried on OCP web-console

       

      Actual results:

      1. The Hive metrics can be exported without enabling monitoring for user-defined projects
      2. 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:

      1. 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
      2. 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:

              Unassigned Unassigned
              jshu@redhat.com Jianping Shu
              None
              None
              None
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: