Uploaded image for project: 'Service Binding'
  1. Service Binding
  2. APPSVC-695

Operator crashes on reconciling if sbr spec contains unknown field

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • Service Binding

      Steps to reproduce:

      1. Run SBO
      2. Apply CR

      apiVersion: operators.coreos.com/v1alpha1
      kind: ServiceBinding
      metadata:
          name: sbr-csv-secret-cm-descriptors
      spec:
          service:
              group: service.example.com
              version: v1
              kind: Backserv
              name: demo-backserv-cr-2
      

      3. SBO logs:

      2020-09-17T14:53:19.886+0530	INFO	reconciler	Reconciling ServiceBinding...	{"Request.Namespace": "test-namespace-469ad684", "Request.Name": "sbr-csv-secret-cm-descriptors"}
      2020-09-17T14:53:20.167+0530	DEBUG	reconciler	Found service binding request to inspect	{"Request.Namespace": "test-namespace-469ad684", "Request.Name": "sbr-csv-secret-cm-descriptors", "ServiceBinding.Name": "sbr-csv-secret-cm-descriptors"}
      E0917 14:53:20.168251   69361 runtime.go:78] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
      goroutine 1033 [running]:
      k8s.io/apimachinery/pkg/util/runtime.logPanic(0x14defe0, 0x23fbce0)
      	/home/pjagrut/go/src/github.com/redhat-developer/service-binding-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:74 +0xa3
      k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
      	/home/pjagrut/go/src/github.com/redhat-developer/service-binding-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:48 +0x82
      panic(0x14defe0, 0x23fbce0)
      	/usr/local/go/src/runtime/panic.go:969 +0x166
      github.com/redhat-developer/service-binding-operator/pkg/controller/servicebinding.(*reconciler).Reconcile(0xc000371380, 0xc000468520, 0x17, 0xc000468500, 0x1d, 0x0, 0xbfd0e8a1f4d2bc31, 0xc0000eaea0, 0xc0000ea908)
      	/home/pjagrut/go/src/github.com/redhat-developer/service-binding-operator/pkg/controller/servicebinding/reconciler.go:122 +0x520
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc00002ac00, 0x15371e0, 0xc000804680, 0xc000595e00)
      	/home/pjagrut/go/src/github.com/redhat-developer/service-binding-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:256 +0x161
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc00002ac00, 0x0)
      	/home/pjagrut/go/src/github.com/redhat-developer/service-binding-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:232 +0xae
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker(0xc00002ac00)
      	/home/pjagrut/go/src/github.com/redhat-developer/service-binding-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:211 +0x2b
      k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1(0xc0005a00d0)
      	/home/pjagrut/go/src/github.com/redhat-developer/service-binding-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:152 +0x5f
      k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc0005a00d0, 0x3b9aca00, 0x0, 0x465301, 0xc000052360)
      	/home/pjagrut/go/src/github.com/redhat-developer/service-binding-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:153 +0xf8
      k8s.io/apimachinery/pkg/util/wait.Until(0xc0005a00d0, 0x3b9aca00, 0xc000052360)
      	/home/pjagrut/go/src/github.com/redhat-developer/service-binding-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88 +0x4d
      created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1
      	/home/pjagrut/go/src/github.com/redhat-developer/service-binding-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:193 +0x305
      panic: runtime error: invalid memory address or nil pointer dereference [recovered]
      	panic: runtime error: invalid memory address or nil pointer dereference
      [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x138ca10]
      
      goroutine 1033 [running]:
      k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
      	/home/pjagrut/go/src/github.com/redhat-developer/service-binding-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:55 +0x105
      panic(0x14defe0, 0x23fbce0)
      	/usr/local/go/src/runtime/panic.go:969 +0x166
      github.com/redhat-developer/service-binding-operator/pkg/controller/servicebinding.(*reconciler).Reconcile(0xc000371380, 0xc000468520, 0x17, 0xc000468500, 0x1d, 0x0, 0xbfd0e8a1f4d2bc31, 0xc0000eaea0, 0xc0000ea908)
      	/home/pjagrut/go/src/github.com/redhat-developer/service-binding-operator/pkg/controller/servicebinding/reconciler.go:122 +0x520
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc00002ac00, 0x15371e0, 0xc000804680, 0xc000595e00)
      	/home/pjagrut/go/src/github.com/redhat-developer/service-binding-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:256 +0x161
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc00002ac00, 0x0)
      	/home/pjagrut/go/src/github.com/redhat-developer/service-binding-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:232 +0xae
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker(0xc00002ac00)
      	/home/pjagrut/go/src/github.com/redhat-developer/service-binding-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:211 +0x2b
      k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1(0xc0005a00d0)
      	/home/pjagrut/go/src/github.com/redhat-developer/service-binding-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:152 +0x5f
      k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc0005a00d0, 0x3b9aca00, 0x0, 0x465301, 0xc000052360)
      	/home/pjagrut/go/src/github.com/redhat-developer/service-binding-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:153 +0xf8
      k8s.io/apimachinery/pkg/util/wait.Until(0xc0005a00d0, 0x3b9aca00, 0xc000052360)
      	/home/pjagrut/go/src/github.com/redhat-developer/service-binding-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88 +0x4d
      created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1
      	/home/pjagrut/go/src/github.com/redhat-developer/service-binding-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:193 +0x305
      time="2020-09-17T14:53:20+05:30" level=fatal msg="Failed to run operator locally: failed to run operator locally: failed to exec []string{\"build/_output/bin/service-binding-operator-local\", \"--zap-level=debug\", \"--zap-encoder=console\", \"--zap-level\", \"2\"}: exit status 2"
      

              Unassigned Unassigned
              pjagrut Pratik Jagrut (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: