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..
- Create the basic cluster spec from example/couchbase-cluster.yaml
- Rename Server Config from "all_servers" -> "new_name"
- 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 |