Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-20438

DeploymentConfig metrics should not be gathered when capability is disabled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 4.14
    • Monitoring
    • None
    • Moderate
    • No
    • MON Sprint 249
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      openshift-state-metrics has logic to generate metrics for deploymentconfigs.  That logic will fail when the deploymentconfig 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/deployment_config.go#L214-L242
      

      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 deployment
      

      Actual results:

      errors in the openshift state metrics container logs due to non-existent api endpoint
      
      E1012 01:37:32.636894       1 reflector.go:138] github.com/openshift/openshift-state-metrics/pkg/collectors/builder.go:228: Failed to watch *v1.DeploymentConfig: failed to list *v1.DeploymentConfig: the server could not find the requested resource (get deploymentconfigs.apps.openshift.io)
      
      
      

      Expected results:

      no errors in the log related to the missing deploymentconfig api
      
      

      Note: this bug will need the same sort of logic as https://issues.redhat.com/browse/OCPBUGS-20437 to make openshift-state-metrics aware of what caps are enabled, so they should be worked together.

              prasriva@redhat.com Pranshu Srivastava
              bparees@redhat.com Ben Parees
              ying zhou ying zhou
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: