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

Operator 2.0 Upgrade steps are not complete.

    XMLWordPrintable

Details

    • Page
    • Resolution: Fixed
    • Major
    • 2.1.0
    • None
    • documentation
    • None
    • 47: Documentation 2
    • 1

    Description

      Following the upgrade steps as outlined here:

      https://docs.couchbase.com/operator/2.0/howto-operator-upgrade.html#update-resources

      A customer would run into this error in the Operator log:

      {"level":"info","ts":1599080184.1098652,"logger":"cluster","msg":"Upgrading resource","cluster":"default/cb-example","kind":"CouchbaseCluster","name":"cb-example","version":"2.0.1"}
      {"level":"error","ts":1599080184.1099539,"logger":"cluster","msg":"Cluster setup failed","cluster":"default/cb-example","error":"failed to lookup /spec/cluster/autoCompaction in add: unexpect
      ed kind invalid in lookup","stacktrace":"github.com/couchbase/couchbase-operator/vendor/github.com/go-logr/zapr.(*zapLogger).Error\n\t/home/couchbase/jenkins/workspace/couchbase-operator-buil
      d/goproj/src/github.com/couchbase/couchbase-operator/vendor/github.com/go-logr/zapr/zapr.go:128\ngithub.com/couchbase/couchbase-operator/pkg/cluster.New\n\t/home/couchbase/jenkins/workspace/c
      ouchbase-operator-build/goproj/src/github.com/couchbase/couchbase-operator/pkg/cluster/cluster.go:143

      This is because our doc does not specify removing the previous Admission controller, when the new Operator is created, it tries to parse the config that was not filled in my Admission controller by default, leading to the cluster being marked as failed.

      Before upgrading the cluster resource with cbopconv, the customer needs to remove the previous Admission controller with

      kubectl delete -f admission.yaml

      and redeploy it with the upgraded version using

      /bin/cbopcfg --no-operator | kubectl create -f -

      Then proceed with upgrading the crd.yaml.

      Only after these steps, we run cbopconv.

      Then after, deploy the Operator

      /bin/cbopcfg --no-admission | kubectl create -f -

      Then the operator will be able to manage the cluster as expected.

      Attachments

        Issue Links

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

          Activity

            People

              simon.murray Simon Murray
              tin.tran Tin Tran (Inactive)
              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