Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-48078

cbbackupmgr fails with srv

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 7.0.2
    • 7.0.0
    • tools
    • Untriaged
    • 1
    • No

    Description

      Problem
      When cbbackumgr uses srv records it will incorrect uses the ports from the SRV record i.e 11210:

      2021-08-20T13:46:04.701+00:00 (Cmd) backup --archive /data/backups --repo test-couchbase-8p9gf-2021-08-20T13_46_04 --cluster couchbase://test-couchbase-8p9gf-srv --username <ud>Administrator</ud> --password ***** --purge --no-progress-bar --threads 1
      2021-08-20T13:46:04.701+00:00 (Cmd) mounted archive with id: 028c1cd5-da8f-4c2a-b469-0cb37ed8fb31
      2021-08-20T13:46:04.703+00:00 (REST) (Attempt 1) (GET) Dispatching request to 'http://10-244-0-70.test-couchbase-8p9gf-srv.test-5trcv.svc.cluster.local:11210/pools/default/nodeServices'
      

      srv-record

      _couchbase._tcp.test-couchbase-8p9gf-srv.test-5trcv.svc.cluster.local. 30 IN SRV 0 33 11210 10-244-0-68.test-couchbase-8p9gf-srv.test-5trcv.svc.cluster.local.
      _couchbase._tcp.test-couchbase-8p9gf-srv.test-5trcv.svc.cluster.local. 30 IN SRV 0 33 11210 10-244-0-69.test-couchbase-8p9gf-srv.test-5trcv.svc.cluster.local.
      _couchbase._tcp.test-couchbase-8p9gf-srv.test-5trcv.svc.cluster.local. 30 IN SRV 0 33 11210 10-244-0-70.test-couchbase-8p9gf-srv.test-5trcv.svc.cluster.local.
      

      Suggestion
      There is kind of a fundamental problem here with SRV and clients that need to bootstrap off the management port. The SRV record has the port of the Data service, where cbbackupmgr needs the management port (normally 8091). This is a regression but changing back to the old behaviour is also broken for alternate port and custom ports (custom ports are not supported).

      There are a few options:

      1. If the port is 11210 or 11207 then assume the defaults are being used and use 8091 and 1809. For custom ports the user has to provide the port.
      2. Bootstrap against the Data service using the port in the SRV. That is tricky as cbbackupmgr would have to bootstrap against the Data Service. Next connect to the management endpoints to get the version, then reconnect against data service with the correct flags base on the versions. (Maybe there is a better way of doing this)
      3. Drop support for couchbase:// and the user has to use http:// with the srv record, if alternate ports are used then they have to be provided with the assumption the port is the same on all ports)
      4. There should be a SRV record just for the management port (This feels technically most correct but not great UX)
      5. srv records should be extended for the management port (Should check if this is within fitting of srv records):

        _couchbase._tcp.test-couchbase-8p9gf-srv.test-5trcv.svc.cluster.local. 30 IN SRV 0 33 11210 10-244-0-68.test-couchbase-8p9gf-srv.test-5trcv.svc.cluster.local.
        _couchbase._tcp.test-couchbase-8p9gf-srv.test-5trcv.svc.cluster.local. 30 IN SRV 0 33 11210 10-244-0-69.test-couchbase-8p9gf-srv.test-5trcv.svc.cluster.local.
        _couchbase._tcp.test-couchbase-8p9gf-srv.test-5trcv.svc.cluster.local. 30 IN SRV 0 33 11210 10-244-0-70.test-couchbase-8p9gf-srv.test-5trcv.svc.cluster.local.
        _http._tcp.test-couchbase-8p9gf-srv.test-5trcv.svc.cluster.local. 30 IN SRV 0 33 11210 10-244-0-68.test-couchbase-8p9gf-srv.test-5trcv.svc.cluster.local.
        _http._tcp.test-couchbase-8p9gf-srv.test-5trcv.svc.cluster.local. 30 IN SRV 0 33 11210 10-244-0-69.test-couchbase-8p9gf-srv.test-5trcv.svc.cluster.local.
        _http._tcp.test-couchbase-8p9gf-srv.test-5trcv.svc.cluster.local. 30 IN SRV 0 33 11210 10-244-0-70.test-couchbase-8p9gf-srv.test-5trcv.svc.cluster.local.
        

      Attachments

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

        Activity

          People

            james.lee James Lee
            pvarley Patrick Varley (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty