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

[BP to 6.5.2 of MB-39210]- Set "User-agent" in request header when making requests from indexer to ns_server

    XMLWordPrintable

    Details

    • Story Points:
      1

      Description

      Indexer has multiple components that query various ns_server endpoints. When such a query from indexer happens, ns_server would log it in ns_server.http_access_internal.log. Below is the format:

      127.0.0.1 - @index-cbauth [04/May/2020:05:39:18 -0700] "GET /pools/default/buckets/other-3/collections HTTP/1.1" 200 98 - "Go-http-client/1.1" 1

      The format of this message is:

      Node IP - User_of_the_request [Timestamp] "Request path" Response_status Size_of_response Referer User-agent Response_time

      Currently, the User_agent value mentions "Go-http-client/1.1" which does not convey any valuable information. Instead, each request from indexer can set the appropriate name of the client as User_agent i.e. RetrievePlanFromCluster can set User-agent as "RetrievePlanFromCluster" and it would get logged as below:

      127.0.0.1 - @index-cbauth [04/May/2020:05:39:18 -0700] "GET /pools/default/buckets/other-3/collections HTTP/1.1" 200 98 - "RetrievePlanFromCluster" 1

      This would help us to associate a request with it's client facilitating easy debugging

        Attachments

          Issue Links

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

            Activity

            Hide
            varun.velamuri Varun Velamuri added a comment - - edited

            Wayne Siu, This is another BP ticket that has some logging improvements in ns_server logs which would help debug customer cases. The fix is already in 6.6 chain (from 6.6.0) and CC chain. Request your approval for 6.5.2

             

            CC: Jeelan Poola, Ritam Sharma

            Show
            varun.velamuri Varun Velamuri added a comment - - edited Wayne Siu , This is another BP ticket that has some logging improvements in ns_server logs which would help debug customer cases. The fix is already in 6.6 chain (from 6.6.0) and CC chain. Request your approval for 6.5.2   CC: Jeelan Poola , Ritam Sharma
            Hide
            build-team Couchbase Build Team added a comment -

            Build couchbase-server-6.5.2-6617 contains indexing commit 3cd07f1 with commit message:
            MB-43517 Set UserAgent in request headers to ns_server

            Show
            build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.2-6617 contains indexing commit 3cd07f1 with commit message: MB-43517 Set UserAgent in request headers to ns_server
            Hide
            hemant.rajput Hemant Rajput added a comment -

            Verified with 6.5.2-6617.

             

            Seeing Go-http-client/1.1-indexer <module_name> in http_access_internal.log

             

            [root@localhost logs]# less http_access_internal.log | grep Go-http-client/1.1 | grep indexer| head -10
            127.0.0.1 - @index-cbauth [13/Jan/2021:03:05:43 -0800] "GET /pools/default?uuid=3f06b75d28d8a592a348cd2a6108cb31 HTTP/1.1" 200 5168 - Go-http-client/1.1-indexer-Indexer::refreshSecurityContextOnTopology
            127.0.0.1 - @index-cbauth [13/Jan/2021:03:05:43 -0800] "GET /pools/default/buckets?v=31237449&uuid=3f06b75d28d8a592a348cd2a6108cb31 HTTP/1.1" 200 2 - Go-http-client/1.1-indexer-Indexer::refreshSecurityContextOnTopology
            127.0.0.1 - @index-cbauth [13/Jan/2021:03:05:43 -0800] "GET /pools/default/nodeServices HTTP/1.1" 200 766 - Go-http-client/1.1-indexer-Indexer::refreshSecurityContextOnTopology
            127.0.0.1 - @index-cbauth [13/Jan/2021:03:05:43 -0800] "GET /pools/default/serverGroups?v=106162660 HTTP/1.1" 200 2407 - Go-http-client/1.1-indexer-Indexer::refreshSecurityContextOnTopology
            127.0.0.1 - @index-cbauth [13/Jan/2021:03:05:43 -0800] "GET /pools/default?uuid=3f06b75d28d8a592a348cd2a6108cb31 HTTP/1.1" 200 5168 - Go-http-client/1.1-indexer-indexer
            127.0.0.1 - @index-cbauth [13/Jan/2021:03:05:43 -0800] "GET /pools/default/buckets?v=31237449&uuid=3f06b75d28d8a592a348cd2a6108cb31 HTTP/1.1" 200 2 - Go-http-client/1.1-indexer-indexer
            127.0.0.1 - @index-cbauth [13/Jan/2021:03:05:43 -0800] "GET /pools/default/nodeServices HTTP/1.1" 200 766 - Go-http-client/1.1-indexer-indexer
            127.0.0.1 - @index-cbauth [13/Jan/2021:03:05:43 -0800] "GET /pools/default/serverGroups?v=106162660 HTTP/1.1" 200 2407 - Go-http-client/1.1-indexer-indexer
            127.0.0.1 - @projector-cbauth [13/Jan/2021:03:05:43 -0800] "GET /pools/default?uuid=3f06b75d28d8a592a348cd2a6108cb31 HTTP/1.1" 200 5168 - Go-http-client/1.1-indexer-projector
            127.0.0.1 - @projector-cbauth [13/Jan/2021:03:05:43 -0800] "GET /pools/default/buckets?v=31237449&uuid=3f06b75d28d8a592a348cd2a6108cb31 HTTP/1.1" 200 2 - Go-http-client/1.1-indexer-projector
            

             

            Show
            hemant.rajput Hemant Rajput added a comment - Verified with 6.5.2-6617.   Seeing Go-http-client/1.1-indexer <module_name> in  http_access_internal.log   [root @localhost logs]# less http_access_internal.log | grep Go-http-client/ 1.1 | grep indexer| head - 10 127.0 . 0.1 - @index -cbauth [ 13 /Jan/ 2021 : 03 : 05 : 43 - 0800 ] "GET /pools/default?uuid=3f06b75d28d8a592a348cd2a6108cb31 HTTP/1.1" 200 5168 - Go-http-client/ 1.1 -indexer-Indexer::refreshSecurityContextOnTopology 127.0 . 0.1 - @index -cbauth [ 13 /Jan/ 2021 : 03 : 05 : 43 - 0800 ] "GET /pools/default/buckets?v=31237449&uuid=3f06b75d28d8a592a348cd2a6108cb31 HTTP/1.1" 200 2 - Go-http-client/ 1.1 -indexer-Indexer::refreshSecurityContextOnTopology 127.0 . 0.1 - @index -cbauth [ 13 /Jan/ 2021 : 03 : 05 : 43 - 0800 ] "GET /pools/default/nodeServices HTTP/1.1" 200 766 - Go-http-client/ 1.1 -indexer-Indexer::refreshSecurityContextOnTopology 127.0 . 0.1 - @index -cbauth [ 13 /Jan/ 2021 : 03 : 05 : 43 - 0800 ] "GET /pools/default/serverGroups?v=106162660 HTTP/1.1" 200 2407 - Go-http-client/ 1.1 -indexer-Indexer::refreshSecurityContextOnTopology 127.0 . 0.1 - @index -cbauth [ 13 /Jan/ 2021 : 03 : 05 : 43 - 0800 ] "GET /pools/default?uuid=3f06b75d28d8a592a348cd2a6108cb31 HTTP/1.1" 200 5168 - Go-http-client/ 1.1 -indexer-indexer 127.0 . 0.1 - @index -cbauth [ 13 /Jan/ 2021 : 03 : 05 : 43 - 0800 ] "GET /pools/default/buckets?v=31237449&uuid=3f06b75d28d8a592a348cd2a6108cb31 HTTP/1.1" 200 2 - Go-http-client/ 1.1 -indexer-indexer 127.0 . 0.1 - @index -cbauth [ 13 /Jan/ 2021 : 03 : 05 : 43 - 0800 ] "GET /pools/default/nodeServices HTTP/1.1" 200 766 - Go-http-client/ 1.1 -indexer-indexer 127.0 . 0.1 - @index -cbauth [ 13 /Jan/ 2021 : 03 : 05 : 43 - 0800 ] "GET /pools/default/serverGroups?v=106162660 HTTP/1.1" 200 2407 - Go-http-client/ 1.1 -indexer-indexer 127.0 . 0.1 - @projector -cbauth [ 13 /Jan/ 2021 : 03 : 05 : 43 - 0800 ] "GET /pools/default?uuid=3f06b75d28d8a592a348cd2a6108cb31 HTTP/1.1" 200 5168 - Go-http-client/ 1.1 -indexer-projector 127.0 . 0.1 - @projector -cbauth [ 13 /Jan/ 2021 : 03 : 05 : 43 - 0800 ] "GET /pools/default/buckets?v=31237449&uuid=3f06b75d28d8a592a348cd2a6108cb31 HTTP/1.1" 200 2 - Go-http-client/ 1.1 -indexer-projector  

              People

              Assignee:
              hemant.rajput Hemant Rajput
              Reporter:
              varun.velamuri Varun Velamuri
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes

                    PagerDuty