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

add nil check to etcdRecoveryActiveCondition when collecting metrics

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Critical Critical
    • None
    • 4.18
    • HyperShift
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • Critical
    • None
    • None
    • Rejected
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      HO bump to v0.1.48 fails due to new HO crashing 
      
      panic: runtime error: invalid memory address or nil pointer dereference
      [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x37a4d7e]
      goroutine 69 [running]:
      github.com/openshift/hypershift/hypershift-operator/controllers/hostedcluster/metrics.(*hostedClustersMetricsCollector).Collect(0xc000e3cbc0, 0xc0007082a0)
          /hypershift/hypershift-operator/controllers/hostedcluster/metrics/metrics.go:476 +0x2cfe
      github.com/prometheus/client_golang/prometheus.(*Registry).Gather.func1()
          /hypershift/vendor/github.com/prometheus/client_golang/prometheus/registry.go:455 +0x189
      created by github.com/prometheus/client_golang/prometheus.(*Registry).Gather in goroutine 181
          /hypershift/vendor/github.com/prometheus/client_golang/prometheus/registry.go:547 +0xddd

       

       

      Version-Release number of selected component (if applicable):

          4.18

      How reproducible:

      100%    

      Steps to Reproduce:

          1. Bump HO from v0.1.47 to v0.1.48
          2.
          3.
          

      Actual results:

          fails to use new HO version

      Expected results:

          Sucessfully uses new HO version

      Additional info:

          this is caused because the etcdRecoveryActive status is only present when the job is trigerred and we dont nil check it during metric collection

              pstefans@redhat.com Patryk Stefanski
              pstefans@redhat.com Patryk Stefanski
              None
              None
              He Liu He Liu
              None
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: