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

Unable to remove server config with exposedFeatures:xdcr

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.0.0
    • 0.8.0, 0.8.1, 1.0.0
    • operator
    • None

    Description

      We get into a situation where cluster cannot reconcile when a server config is removed when exposing xdcr features because filterAllowedPorts is always expecting config to exist here:

      func filterAllowedPorts(nodeName string, members couchbaseutil.MemberSet, cluster *cbapi.CouchbaseCluster, ports []v1.ServicePort)
       
      ....
        config := cluster.Spec.GetServerConfigByName(member.ServerConfig)
       
        if config == nil {
       
          return nil, fmt.Errorf("Node config %s not found", member.ServerConfig)
       
        }

       

      The quickest way to repro this is to try to rename the ServerConfig..

      1. Create the basic cluster spec from  example/couchbase-cluster.yaml
      2. Rename Server Config from "all_servers" -> "new_name"
      3. Push updated spec, and notice operator is unable to reconcile since name of old config is still expected:

      time="2018-08-06T20:29:25Z" level=info msg="Start reconciling" cluster-name=cb-example module=cluster
       
      time="2018-08-06T20:29:25Z" level=info msg="server config newname: " cluster-name=cb-example module=cluster
       
      time="2018-08-06T20:29:25Z" level=info msg="Finish reconciling" cluster-name=cb-example module=cluster
       
      time="2018-08-06T20:29:25Z" level=error msg="failed to reconcile: Node config all_services not found" cluster-name=cb-example module=cluster

       

       

      Attachments

        For Gerrit Dashboard: K8S-514
        # Subject Branch Project Status CR V

        Activity

          People

            simon.murray Simon Murray
            tommie Tommie McAfee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty