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

[TC] [REST] Make `AltHost` (address replacement) production ready

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Major
    • master
    • master
    • tools-common
    • None
    • 0

    Description

      What's the issue?

      A recent change added an 'AltHost' function to the REST client which allows users to override the resolved address for a request.

      This was added to support some private DNS functionality in Capella, where nodes have two hostnames, one public, another private; the public is deterministically generated from the private.

      What's the fix?

      While this solution works - and I can't think of a better one, barring using Alternative Addressing - there's a few changes I'd like to make.

      1. Remove the use of 'AltHost' as it's overloading 'AltAddr' and adding unnecessary complexity 
      2. Allow users to only modify the host, not the entire qualified URL; the latter is a foot gun as they can override 'cbrest' routing entirely (and we wouldn't know)
      3. Add logging which triggers when a successful replacement occurs so we can track how/when this functionality is used (and subsequently support it)

      Attachments

        Activity

          People

            james.lee James Lee
            james.lee James Lee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty