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

Use of local address from Request is probably not correct

    XMLWordPrintable

Details

    • Untriaged
    • Unknown

    Description

      When attempting the below REST requests, there is a difference in using localhost and 127.0.0.1,

      $ curl -X GET -u Administrator:asdasd 'http://localhost:9000/_uistats?bucket=travel-sample&node=127.0.0.1:9001&zoom=minute'
      not found
       
      $ curl -X GET -u Administrator:asdasd 'http://127.0.0.1:9000/_uistats?bucket=travel-sample&node=127.0.0.1:9001&zoom=minute'
      {"stats":{"@kv-travel-sample":{"couch_total_disk_size":[55115940,551159 
      ...

      This fails because we are unable to find node hostname here, http://src.couchbase.org/source/xref/mad-hatter/ns_server/src/menelaus_stats.erl#2596

       

      The problem is that right now, we derive the local address from the REST request as in http://src.couchbase.org/source/xref/mad-hatter/ns_server/src/menelaus_util.erl#377 .

      This local address is then used to compare nodes which may be parameters to REST API. 

       

      I am unclear why this was done is looks like a bug. 

      Attachments

        Issue Links

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

          Activity

            People

              hemant.rajput Hemant Rajput
              Abhijeeth.Nuthan Abhijeeth Nuthan
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty