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

Synchronise CBAUTH_REVRPC_URL & service_api address for the query service.

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Unknown

    Description

      In MB-40533 I discovered that whilst the CBAUTH_REVRPC_URL is set to http://.../cbq-engine* (which means the cbauth service registration looks for a service "cbq-engine-service_api") , ns_server is listening to/for ".../n1ql-service_api".

      The original approach we took to contain things was to augment the cbauth API with a function that wasn't reliant on the environment variable (thus permitting us to make the change) but cbauth don't want this, so we need the provided URL or the service listener address to change.

      I've tested changing tls_config (src/menelaus_cbauth.erl) and goport_defs (src/ns_ports_setup.erl; setting 'rpc' to 'n1ql') and it seems to work but I suspect there would be upgrade implications.

      Another approach tried was to add a special case in conn_label (src/service_agent.erl) to generate "cbq-engine-service_api" for the n1ql service. As it is only the new feature that is using this service, the thought is that this best contains any side-effects. (However doing this seems to break everything.)

      Nevertheless the requirement remains - provide a consistent CBAUTH_REVRPC_URL value & service_api listener address - so that we can call cbauth.RegisterManager() and have it connect with the set CBAUTH_REVRPC_URL value.

      Attachments

        Issue Links

          For Gerrit Dashboard: MB-48847
          # Subject Branch Project Status CR V

          Activity

            It looks like the problem is that this hack http://review.couchbase.org/c/cbauth/+/158105 doesn't work correctly. I'll see if we can get rid of it.

            artem Artem Stemkovski added a comment - It looks like the problem is that this hack http://review.couchbase.org/c/cbauth/+/158105 doesn't work correctly. I'll see if we can get rid of it.

            Hmm... it works perfectly, but isn't desired by cbauth.    If we can get a consistent -service_api and CBAUTH_REVRPC_URL set, it won't be necessary.

            Donald.haggart Donald Haggart added a comment - Hmm... it works perfectly, but isn't desired by cbauth.    If we can get a consistent -service_api and CBAUTH_REVRPC_URL set, it won't be necessary.

            So if it works, does it mean that you are not blocked?

            artem Artem Stemkovski added a comment - So if it works, does it mean that you are not blocked?

            The feature dependent on it is working and tested.  But, cbauth don't want the proposed API change which is necessary if the -service_api and provided CBAUTH_REVRPC_URL don't match.  So it is necessary but I'll defer to Kamini Jagtiani to negotiate the urgency of this for Neo. 

            Donald.haggart Donald Haggart added a comment - The feature dependent on it is working and tested.  But , cbauth don't want the proposed API change which is necessary if the -service_api and provided CBAUTH_REVRPC_URL don't match.  So it is necessary but I'll defer to Kamini Jagtiani to negotiate the urgency of this for Neo. 

            Build couchbase-server-7.1.0-1666 contains ns_server commit 1ed185f with commit message:
            MB-48847 correctly populate CBAUTH_REVRPC_URL for cbq-engine

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.0-1666 contains ns_server commit 1ed185f with commit message: MB-48847 correctly populate CBAUTH_REVRPC_URL for cbq-engine

            Build couchbase-server-7.1.0-1666 contains query commit 275d58a with commit message:
            MB-48847 discontinue using RegisterManagerWithURL since the url

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.0-1666 contains query commit 275d58a with commit message: MB-48847 discontinue using RegisterManagerWithURL since the url

            Build couchbase-server-7.1.0-1667 contains cbauth commit 057c150 with commit message:
            MB-48847 remove no longer used RegisterManagerWithURL

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.0-1667 contains cbauth commit 057c150 with commit message: MB-48847 remove no longer used RegisterManagerWithURL

            Build couchbase-server-7.1.0-1677 contains ns_server commit 519da79 with commit message:
            MB-48847 return CBAUTH_REVRPC_URL for cbq-engine to be

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.0-1677 contains ns_server commit 519da79 with commit message: MB-48847 return CBAUTH_REVRPC_URL for cbq-engine to be
            dfinlay Dave Finlay added a comment -

            Closing as this specific issue is addressed.

            dfinlay Dave Finlay added a comment - Closing as this specific issue is addressed.

            People

              artem Artem Stemkovski
              Donald.haggart Donald Haggart
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty