Uploaded image for project: 'Couchbase Kubernetes'
  1. Couchbase Kubernetes
  2. K8S-109

Operator panic when rebalance status is nil

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.7.0
    • 0.7.0
    • operator

    Description

      This can happen if node to remove is not within cluster or rebalance api returns error for some reason and yet wait = true.

       

      from

            status, err := client.Rebalance(nodesToRemove)
       
            if wait {
       
              status.SetLogger(retryutil.Log(clusterName))
       
              return status.Wait()
       
            }

       

      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=0x0 pc=0x202f640]
       
       
       
      goroutine 15 [running]:
       
      testing.tRunner.func1(0xc420350b60)
       
      /usr/local/go/src/testing/testing.go:622 +0x55f
       
      panic(0x21f7d60, 0x2bbd470)
       
      /usr/local/go/src/runtime/panic.go:489 +0x2f0
       
      github.com/couchbase/couchbase-operator/vendor/github.com/couchbaselabs/gocbmgr.(*RebalanceProgress).SetLogger(0x0, 0xc4200510e0)
       
      /opt/go/src/github.com/couchbase/couchbase-operator/vendor/github.com/couchbaselabs/gocbmgr/api.go:60 +0x30
       
      github.com/couchbase/couchbase-operator/pkg/util/couchbaseutil.Rebalance.func1(0x202e9a2, 0x6)
       
      /opt/go/src/github.com/couchbase/couchbase-operator/pkg/util/couchbaseutil/couchbaseutil.go:147 +0x103
       
      github.com/couchbase/couchbase-operator/pkg/util/retryutil.RetryOnErr.func1(0x100000008, 0x23865e0, 0xc4200ca8c0)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          There are no comments yet on this issue.

          People

            tommie Tommie McAfee
            tommie Tommie McAfee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty