Details
-
Bug
-
Resolution: Fixed
-
Critical
-
None
-
None
-
39: Bk Vol. Bugs. Ptwx.
-
1
Description
Description:
When creating XDCR with source and target buckets of the same name, only 1 direction would work, the other direction would hit the following error:
{"level":"error","ts":1600123046.6096296,"logger":"cluster","msg":"Status update failed","cluster":"default/cb-test","error":"admission webhook \"couchbase-operator-admission.default.svc\" denied the request: validation failure list:\nbucket travel-sample referenced by spec.bucket in couchbasereplications.couchbase.com/xdcr-test-test must exist: bucket travel-sample not found","stacktrace":"github.com/couchbase/couchbase-operator/vendor/github.com/go-logr/zapr.(*zapLogger). |
|
Steps to re-create:
1) Create 2 clusters in the same namespace, (cb-example.yaml and cb-test.yaml)
2) Create 2 buckets with couchbase-bucket.yaml
apiVersion: couchbase.com/v2
|
kind: CouchbaseBucket
|
metadata:
|
name: travel-test
|
labels:
|
cluster: cb-test
|
spec:
|
name: travel-sample
|
memoryQuota: 256Mi
|
replicas: 2 |
ioPriority: low
|
evictionPolicy: valueOnly
|
conflictResolution: lww
|
enableFlush: false |
enableIndexReplica: true |
compressionMode: passive
|
---
|
apiVersion: couchbase.com/v2
|
kind: CouchbaseBucket
|
metadata:
|
name: travel-sample
|
labels:
|
cluster: cb-example
|
spec:
|
name: travel-sample
|
memoryQuota: 256Mi
|
replicas: 2 |
ioPriority: low
|
evictionPolicy: valueOnly
|
conflictResolution: lww
|
enableFlush: false |
enableIndexReplica: true |
compressionMode: passive
|
---
|
3) create XDCR from cb-example to cb-test with xdcrexample.yaml
apiVersion: couchbase.com/v2
|
kind: CouchbaseReplication
|
metadata:
|
name: xdcr-example-test-travel
|
labels:
|
cluster: cb-example
|
spec:
|
bucket: travel-sample
|
remoteBucket: travel-sample
|
paused: false |
This works without issue.
4) Create XDCR from cb-test to cb-example with xdcrtest.yaml:
apiVersion: couchbase.com/v2
|
kind: CouchbaseReplication
|
metadata:
|
name: xdcr-test-sample-travel
|
labels:
|
cluster: cb-test
|
spec:
|
bucket: travel-sample
|
remoteBucket: travel-sample
|
paused: false
|
5) The operator would show this error in the logs:
{"level":"error","ts":1600123895.1002529,"logger":"cluster","msg":"Status update failed","cluster":"default/cb-test","error":"adm
|
ission webhook \"couchbase-operator-admission.default.svc\" denied the request: validation failure list:\nbucket travel-sample re
|
ferenced by spec.bucket in couchbasereplications.couchbase.com/xdcr-test-sample-travel must exist: bucket travel-sample not found
|
","stacktrace":"github.com/couchbase/couchbase-operator/vendor/github.com/go-logr/zapr.(*zapLogger).
|
The error goes away if using with a different bucket name for source or remote.