Uploaded image for project: 'OpenShift GitOps'
  1. OpenShift GitOps
  2. GITOPS-1213

Operator crashing on reconciling an empty argocd-cm

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 1.2
    • 1.2
    • None
    • None
    • False
    • False
    • Undefined
    • GITOPS Sprint 204

      Hi Team,

       I have observed an unexpected crash of gitops-operator on OSD platform. Probably because Operator is trying to reconcile an empty configmap.

      jfischer@redhat.com can reproduce this issue by creating an empty Argo CD configmap (argocd-cm) in a namespace and then creating an Argo CD CR. Noticed that operator crashed while reconciling the empty configmap.

      Error:
      goroutine 1873 [running]:
      k8s.io/apimachinery/pkg/util/runtime.logPanic(0x1769d40, 0x1b43340)
      /remote-source/deps/gomod/pkg/mod/k8s.io/apimachinery@v0.18.3/pkg/util/runtime/runtime.go:74 +0xa6
      k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
      /remote-source/deps/gomod/pkg/mod/k8s.io/apimachinery@v0.18.3/pkg/util/runtime/runtime.go:48 +0x86
      panic(0x1769d40, 0x1b43340)
      /usr/lib/golang/src/runtime/panic.go:965 +0x1b9
      github.com/argoproj-labs/argocd-operator/pkg/controller/argocd.(*ReconcileArgoCD).reconcileExistingArgoConfigMap(0xc0008f4000, 0xc008c18780, 0xc00850e000, 0x0, 0x0)
      /remote-source/deps/gomod/pkg/mod/github.com/argoproj-labs/argocd-operator@v0.0.16-0.20210715041124-bb75775953f8/pkg/controller/argocd/configmap.go:420 +0x53e
      github.com/argoproj-labs/argocd-operator/pkg/controller/argocd.(*ReconcileArgoCD).reconcileArgoConfigMap(0xc0008f4000, 0xc00850e000, 0x0, 0x0)
      /remote-source/deps/gomod/pkg/mod/github.com/argoproj-labs/argocd-operator@v0.0.16-0.20210715041124-bb75775953f8/pkg/controller/argocd/configmap.go:312 +0x11af
      github.com/argoproj-labs/argocd-operator/pkg/controller/argocd.(*ReconcileArgoCD).reconcileConfigMaps(0xc0008f4000, 0xc00850e000, 0x17, 0x0)
      /remote-source/deps/gomod/pkg/mod/github.com/argoproj-labs/argocd-operator@v0.0.16-0.20210715041124-bb75775953f8/pkg/controller/argocd/configmap.go:250 +0x39
      github.com/argoproj-labs/argocd-operator/pkg/controller/argocd.(*ReconcileArgoCD).reconcileResources(0xc0008f4000, 0xc00850e000, 0xc000042068, 0xc000ec8680)
      runtime@v0.6.0/pkg/internal/controller/controller.go:193 +0x32d
      panic: assignment to entry in nil map [recovered]
      panic: assignment to entry in nil map

      Acceptance Criteria:
      Operator should not crash. 

              aveerama@redhat.com Abhishek Veeramalla
              aveerama@redhat.com Abhishek Veeramalla
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: