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

Crash when no .data exists in argocd-secret

XMLWordPrintable

    • 3
    • False
    • False
    • Hide
      * Before this update, if the Operator managed an Argo CD instance that lacked the `.data` field in the `argocd-secret` Secret, the Operator on that instance crashed. This update fixes the issue so that the Operator doesn't crash when the `.data` field is missing. Instead, the secret regenerates and the `gitops-operator-controller-manager` resource is redeployed. link:https://issues.redhat.com/browse/GITOPS-1402[GITOPS-1402]
      Show
      * Before this update, if the Operator managed an Argo CD instance that lacked the `.data` field in the `argocd-secret` Secret, the Operator on that instance crashed. This update fixes the issue so that the Operator doesn't crash when the `.data` field is missing. Instead, the secret regenerates and the `gitops-operator-controller-manager` resource is redeployed. link: https://issues.redhat.com/browse/GITOPS-1402 [ GITOPS-1402 ]
    • GITOPS Sprint 210

      When a user deletes the .data out of argocd-secret the operator is unable to recover and enters a panic.

       

      Upon deleting the argocd-secret and deleting the gitops-operator pod, the operator is able to recover. 

       

      This Jira is to ensure that the scenario when a user has deleted their .data or modified their argocd-secret, that the operator is able to reconcile correctly.

       

      E1001 08:04:23.742466       1 runtime.go:78] Observed a panic: "assignment to entry in nil map" (assignment to entry in nil map)E1001 08:04:23.742466       1 runtime.go:78] Observed a panic: "assignment to entry in nil map" (assignment to entry in nil map)goroutine 3146 [running]:k8s.io/apimachinery/pkg/util/runtime.logPanic(0x1773b60, 0x1b4da40) /remote-source/deps/gomod/pkg/mod/k8s.io/apimachinery@v0.18.3/pkg/util/runtime/runtime.go:74 +0xa6k8s.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 +0x86panic(0x1773b60, 0x1b4da40) /opt/rh/go-toolset-1.16/root/usr/lib/go-toolset-1.16-golang/src/runtime/panic.go:965 +0x1b9github.com/argoproj-labs/argocd-operator/pkg/controller/argocd.(*ReconcileArgoCD).reconcileExistingArgoSecret(0xc000358a38, 0xc00085aa00, 0xc00c7e3180, 0xc00c7e3040, 0xc00c7e3400, 0xd, 0x1b737a0) /remote-source/deps/gomod/pkg/mod/github.com/argoproj-labs/argocd-operator@v0.0.16-0.20210906093358-e73b8a770ca5/pkg/controller/argocd/secret.go:306 +0x434github.com/argoproj-labs/argocd-operator/pkg/controller/argocd.(*ReconcileArgoCD).reconcileArgoSecret(0xc000358a38, 0xc00085aa00, 0x0, 0x0) /remote-source/deps/gomod/pkg/mod/github.com/argoproj-labs/argocd-operator@v0.0.16-0.20210906093358-e73b8a770ca5/pkg/controller/argocd/secret.go:168 +0xa9agithub.com/argoproj-labs/argocd-operator/pkg/controller/argocd.(*ReconcileArgoCD).reconcileSecrets(0xc000358a38, 0xc00085aa00, 0x13, 0x0) /remote-source/deps/gomod/pkg/mod/github.com/argoproj-labs/argocd-operator@v0.0.16-0.20210906093358-e73b8a770ca5/pkg/controller/argocd/secret.go:547 +0x65github.com/argoproj-labs/argocd-operator/pkg/controller/argocd.(*ReconcileArgoCD).reconcileResources(0xc000358a38, 0xc00085aa00, 0xc000042068, 0xc0009a6e70) /remote-source/deps/gomod/pkg/mod/github.com/argoproj-labs/argocd-operator@v0.0.16-0.20210906093358-e73b8a770ca5/pkg/controller/argocd/util.go:693 +0x295github.com/argoproj-labs/argocd-operator/pkg/controller/argocd.(*ReconcileArgoCD).Reconcile(0xc000358a38, 0xc0009a6e70, 0xc, 0xc0009a6e60, 0x6, 0xd0b0827a1, 0xc0054ead80, 0xc0005e82e8, 0xc0005e82d0) /remote-source/deps/gomod/pkg/mod/github.com/argoproj-labs/argocd-operator@v0.0.16-0.20210906093358-e73b8a770ca5/pkg/controller/argocd/argocd_controller.go:124 +0x6f8sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc0002c03c0, 0x17d6e20, 0xc000535140, 0xc0005c1e00) /remote-source/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.0/pkg/internal/controller/controller.go:256 +0x166sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc0002c03c0, 0x203000) /remote-source/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.0/pkg/internal/controller/controller.go:232 +0xb0sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker(...) /remote-source/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.0/pkg/internal/controller/controller.go:211k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0xc006a44690) /remote-source/deps/gomod/pkg/mod/k8s.io/apimachinery@v0.18.3/pkg/util/wait/wait.go:155 +0x5fk8s.io/apimachinery/pkg/util/wait.BackoffUntil(0xc006a44690, 0x1b66680, 0xc006763020, 0xc010a69301, 0xc0002f61e0) /remote-source/deps/gomod/pkg/mod/k8s.io/apimachinery@v0.18.3/pkg/util/wait/wait.go:156 +0x9bk8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc006a44690, 0x3b9aca00, 0x0, 0x100000000000001, 0xc0002f61e0) /remote-source/deps/gomod/pkg/mod/k8s.io/apimachinery@v0.18.3/pkg/util/wait/wait.go:133 +0x98k8s.io/apimachinery/pkg/util/wait.Until(0xc006a44690, 0x3b9aca00, 0xc0002f61e0) /remote-source/deps/gomod/pkg/mod/k8s.io/apimachinery@v0.18.3/pkg/util/wait/wait.go:90 +0x4dcreated by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1 /remote-source/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.0/pkg/internal/controller/controller.go:193 +0x32dpanic: assignment to entry in nil map [recovered] panic: assignment to entry in nil map
      goroutine 3146 [running]: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:55 +0x109panic(0x1773b60, 0x1b4da40) /opt/rh/go-toolset-1.16/root/usr/lib/go-toolset-1.16-golang/src/runtime/panic.go:965 +0x1b9github.com/argoproj-labs/argocd-operator/pkg/controller/argocd.(*ReconcileArgoCD).reconcileExistingArgoSecret(0xc000358a38, 0xc00085aa00, 0xc00c7e3180, 0xc00c7e3040, 0xc00c7e3400, 0xd, 0x1b737a0) /remote-source/deps/gomod/pkg/mod/github.com/argoproj-labs/argocd-operator@v0.0.16-0.20210906093358-e73b8a770ca5/pkg/controller/argocd/secret.go:306 +0x434github.com/argoproj-labs/argocd-operator/pkg/controller/argocd.(*ReconcileArgoCD).reconcileArgoSecret(0xc000358a38, 0xc00085aa00, 0x0, 0x0) /remote-source/deps/gomod/pkg/mod/github.com/argoproj-labs/argocd-operator@v0.0.16-0.20210906093358-e73b8a770ca5/pkg/controller/argocd/secret.go:168 +0xa9agithub.com/argoproj-labs/argocd-operator/pkg/controller/argocd.(*ReconcileArgoCD).reconcileSecrets(0xc000358a38, 0xc00085aa00, 0x13, 0x0) /remote-source/deps/gomod/pkg/mod/github.com/argoproj-labs/argocd-operator@v0.0.16-0.20210906093358-e73b8a770ca5/pkg/controller/argocd/secret.go:547 +0x65github.com/argoproj-labs/argocd-operator/pkg/controller/argocd.(*ReconcileArgoCD).reconcileResources(0xc000358a38, 0xc00085aa00, 0xc000042068, 0xc0009a6e70) /remote-source/deps/gomod/pkg/mod/github.com/argoproj-labs/argocd-operator@v0.0.16-0.20210906093358-e73b8a770ca5/pkg/controller/argocd/util.go:693 +0x295github.com/argoproj-labs/argocd-operator/pkg/controller/argocd.(*ReconcileArgoCD).Reconcile(0xc000358a38, 0xc0009a6e70, 0xc, 0xc0009a6e60, 0x6, 0xd0b0827a1, 0xc0054ead80, 0xc0005e82e8, 0xc0005e82d0) /remote-source/deps/gomod/pkg/mod/github.com/argoproj-labs/argocd-operator@v0.0.16-0.20210906093358-e73b8a770ca5/pkg/controller/argocd/argocd_controller.go:124 +0x6f8sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc0002c03c0, 0x17d6e20, 0xc000535140, 0xc0005c1e00) /remote-source/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.0/pkg/internal/controller/controller.go:256 +0x166sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc0002c03c0, 0x203000) /remote-source/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.0/pkg/internal/controller/controller.go:232 +0xb0sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker(...) /remote-source/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.0/pkg/internal/controller/controller.go:211k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0xc006a44690) /remote-source/deps/gomod/pkg/mod/k8s.io/apimachinery@v0.18.3/pkg/util/wait/wait.go:155 +0x5fk8s.io/apimachinery/pkg/util/wait.BackoffUntil(0xc006a44690, 0x1b66680, 0xc006763020, 0xc010a69301, 0xc0002f61e0) /remote-source/deps/gomod/pkg/mod/k8s.io/apimachinery@v0.18.3/pkg/util/wait/wait.go:156 +0x9bk8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc006a44690, 0x3b9aca00, 0x0, 0x100000000000001, 0xc0002f61e0) /remote-source/deps/gomod/pkg/mod/k8s.io/apimachinery@v0.18.3/pkg/util/wait/wait.go:133 +0x98k8s.io/apimachinery/pkg/util/wait.Until(0xc006a44690, 0x3b9aca00, 0xc0002f61e0) /remote-source/deps/gomod/pkg/mod/k8s.io/apimachinery@v0.18.3/pkg/util/wait/wait.go:90 +0x4dcreated by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1 /remote-source/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.0/pkg/internal/controller/controller.go:193 +0x32d
      

              rescott1 Regina Scott (Inactive)
              iwatson@redhat.com Ian Watson
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: