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

XDCR with Operator hits error when specifying CompressionType=Snappy

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 2.1.0
    • kubernetes, operator
    • None
    • 39: Bk Vol. Bugs. Ptwx.
    • 1

    Description

      Background:

      When creating a XDCR with the compressionType in the resource yaml, the operator would show this error:

      {"level":"error","ts":1600124152.3097847,"logger":"cluster","msg":"Reconciliation failed","cluster":"default/cb-example","error":
      "[request failed POST http://cb-example-0000.cb-example.default.svc:8091/controller/createReplication 400 Bad Request: {\"errors\
      ":{\"compressionType\":\"Unable to translate user input to internal compression Type\"}}],

       

      Steps to reproduce:

      1) Create an XDCR resource:

      apiVersion: couchbase.com/v2
      kind: CouchbaseReplication
      metadata:
       name: xdcr-example-test-travel
       labels:
       cluster: cb-example
      spec:
       bucket: travel-sample
       remoteBucket: travel-sample
       compressionType: Snappy
       filterExpression: ""
       paused: false

      2) The Operator would throw the above error, specifying "Snappy" produces the same result. The option works for Auto and None, but not Snappy

      Attachments

        Issue Links

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

          Activity

            simon.murray Simon Murray added a comment -

            XDCR is throwing the error.  Please run again with the Operator using "--zap-level=2" and capture logs with cbopinfo and attach them.

            simon.murray Simon Murray added a comment - XDCR is throwing the error.  Please run again with the Operator using "--zap-level=2" and capture logs with cbopinfo and attach them.
            tin.tran Tin Tran added a comment -

            hi Simon Murray

            I have attached the cbopinfo with --zap-level=2.

             

            Thank you Simon

            tin.tran Tin Tran added a comment - hi Simon Murray I have attached the cbopinfo with --zap-level=2.   Thank you Simon
            simon.murray Simon Murray added a comment -

            This says:

                    - --zap-level
                    - debug

            not level 2 I'm afraid.  Really need 2 as that has full HTTP debug.

            simon.murray Simon Murray added a comment - This says: - --zap-level - debug not level 2 I'm afraid.  Really need 2 as that has full HTTP debug.
            tin.tran Tin Tran added a comment -

            Hi Simon Murray

            I have tried again with 

            • --zap-level
            • "2"

             

            and the new cbopinfo here: cbopinfo-20200916T151639-0700.tar.gz

            Please let me know if there's anything else you need.

             

            Thank you Simon

            tin.tran Tin Tran added a comment - Hi Simon Murray I have tried again with  --zap-level "2"   and the new cbopinfo here:  cbopinfo-20200916T151639-0700.tar.gz Please let me know if there's anything else you need.   Thank you Simon
            simon.murray Simon Murray added a comment -

            Great!

            So the logs say:

            {"level":"Level(-2)","ts":1600294412.1647215,"logger":"client","msg":"http","request body":"compressionType=Snappy&fromBucket=travel-sample&pauseRequested=false&replicationType=continuous&toBucket=travel-sample&toCluster=cb-test&type=xmem"}
            {"level":"debug","ts":1600294412.1662729,"logger":"client","msg":"http","method":"POST","url":"http://cb-example-0001.cb-example.default.svc:8091/controller/createReplication","status":"400 Bad Request","time_ms":1.486129}
            {"level":"Level(-2)","ts":1600294412.1663227,"logger":"client","msg":"http","response body":"{\"errors\":{\"compressionType\":\"Unable to translate user input to internal compression Type\"}}"}

            And the docs say this is valid:

            https://docs.couchbase.com/server/6.6/rest-api/rest-xdcr-create-replication.html

            -d compressionType=["None" | "Auto" | "Snappy"]

            Help me Obi Huang Kenobi... Neil Huang any insight into what's going down?  The image is couchbase/server:6.5.1 according to the logs.

            simon.murray Simon Murray added a comment - Great! So the logs say: {"level":"Level(-2)","ts":1600294412.1647215,"logger":"client","msg":"http","request body":"compressionType=Snappy&fromBucket=travel-sample&pauseRequested=false&replicationType=continuous&toBucket=travel-sample&toCluster=cb-test&type=xmem"} {"level":"debug","ts":1600294412.1662729,"logger":"client","msg":"http","method":"POST","url":"http://cb-example-0001.cb-example.default.svc:8091/controller/createReplication","status":"400 Bad Request","time_ms":1.486129} {"level":"Level(-2)","ts":1600294412.1663227,"logger":"client","msg":"http","response body":"{\"errors\":{\"compressionType\":\"Unable to translate user input to internal compression Type\"}}"} And the docs say this is valid: https://docs.couchbase.com/server/6.6/rest-api/rest-xdcr-create-replication.html -d compressionType=["None" | "Auto" | "Snappy"] Help me Obi Huang Kenobi... Neil Huang any insight into what's going down?  The image is couchbase/server:6.5.1 according to the logs.
            neil.huang Neil Huang added a comment - - edited

            Be 34864 the MB, you must hit.

            According to documentation 6.5, it looks like the doc team has already removed the "snappy" option from the REST page.

            Anyhow - "auto" would be the right answer here.

            neil.huang Neil Huang added a comment - - edited Be 34864 the MB, you must hit. According to documentation 6.5, it looks like the doc team has already removed the "snappy" option from the REST page. Anyhow - "auto" would be the right answer here.
            simon.murray Simon Murray added a comment -

            Sagacious advice you have.  I shall kill it off then.

            simon.murray Simon Murray added a comment - Sagacious advice you have.  I shall kill it off then.

            People

              simon.murray Simon Murray
              tin.tran Tin Tran
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty