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

[SGW] TLS required by default from Sync Gateway 3.0

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.3.0
    • testing
    • 1

    Description

      Sync-Gateway test case(s) affected: TestSyncGatewayCreateRemote

      Refer: https://docs.couchbase.com/sync-gateway/current/secure-sgw-access.html#overview

      TLS not used in test case mentioned above: https://github.com/couchbase/couchbase-operator/blob/master/test/e2e/sync_gateway_test.go#L83

      Error: 

      2022-02-28T10:58:21.455Z [ERR] Couldn't start Sync Gateway: 1 errors:
      Must use secure scheme in Couchbase Server URL, or opt out by setting bootstrap.use_tls_server to false. Current URL: couchbase://test-couchbase-2shsz-srv.test-hqbzd?network=default -- rest.ServerMain() at main.go:26 

      Resolution: Skip TestSyncGatewayCreateRemote against Sync Gateway Images >= 3.0.0

      as we will be already testing the required scenario in TestSyncGatewayCreateRemoteTLS.  (https://github.com/couchbase/couchbase-operator/blob/master/test/e2e/sync_gateway_test.go#L87 )

       

      If this is not acceptable, we would need to set the bootstrap.use_tls_server to false in sync_gateway.json (https://github.com/couchbase/couchbase-operator/blob/515dfb9b8b2575d2f46715a33473380e1e06de21/test/e2e/e2eutil/sync-gateway.go#L113 ) according to different SGW image versions.

       

      Skipping makes more sense without cluttering the codebase, but I would leave it to you for the final decision.

      CC: Simon Murray 

      Attachments

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

        Activity

          Upon further inspection, there are 2 more test cases that do not use the secure scheme.
          TestSyncGatewayCreateLocal  and TestSyncGatewayRBAC.
           
          Interestingly, these 3 test cases do not fail at all times. They are failing one at a time for some reason on the dev pipeline with the same error mentioned in the description.
           
          For eg in: https://jenkins.spjmurray.co.uk/job/couchbase-operator-continuous-integration/958/console , the TestSyncGatewayCreateLocal fails as a part of the sanity suite but passes when part of the SGW suite.
           
          I guess we might be hitting a race condition when TLS is not set? In which case, should we even skip these test cases?

          prateek.kumar Prateek Kumar (Inactive) added a comment - Upon further inspection, there are 2 more test cases that do not use the secure scheme. TestSyncGatewayCreateLocal  and TestSyncGatewayRBAC.   Interestingly, these 3 test cases do not fail at all times. They are failing one at a time for some reason on the dev pipeline with the same error mentioned in the description.   For eg in: https://jenkins.spjmurray.co.uk/job/couchbase-operator-continuous-integration/958/console , the TestSyncGatewayCreateLocal fails as a part of the sanity suite but passes when part of the SGW suite.   I guess we might be hitting a race condition when TLS is not set? In which case, should we even skip these test cases?

          Run against master branch pointed at HEAD: https://jenkins.spjmurray.co.uk/job/couchbase-operator-continuous-integration/961/console

          2 SGW failures: TestSyncGatewayCreateLocal  and TestSyncGatewayRBAC.

          Logs attached.

          sgw.tar.gz

          This run was done to confirm that the Gerrit change is not causing regression in the sync gateway suite.

          prateek.kumar Prateek Kumar (Inactive) added a comment - Run against master branch pointed at HEAD: https://jenkins.spjmurray.co.uk/job/couchbase-operator-continuous-integration/961/console 2 SGW failures: TestSyncGatewayCreateLocal  and TestSyncGatewayRBAC. Logs attached. sgw.tar.gz This run was done to confirm that the Gerrit change is not causing regression in the sync gateway suite.
          prateek.kumar Prateek Kumar (Inactive) added a comment - With proposed changes, No failures with 2.8.3: https://jenkins.spjmurray.co.uk/job/couchbase-operator-continuous-integration/962/console No Failures with 3.1.0-66: https://jenkins.spjmurray.co.uk/job/couchbase-operator-continuous-integration/963/console

          Build couchbase-operator-2.3.0-262 contains couchbase-operator commit 1c48696 with commit message:
          K8S-2646 : Skipping SGW remote test case when image version>2.8.3

          build-team Couchbase Build Team added a comment - Build couchbase-operator-2.3.0-262 contains couchbase-operator commit 1c48696 with commit message: K8S-2646 : Skipping SGW remote test case when image version>2.8.3

          Fix merged.

          prateek.kumar Prateek Kumar (Inactive) added a comment - Fix merged.

          People

            prateek.kumar Prateek Kumar (Inactive)
            prateek.kumar Prateek Kumar (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