Uploaded image for project: 'Hadoop Distributed Data Store'
  1. Hadoop Distributed Data Store
  2. HDDS-1925

ozonesecure acceptance test broken by HTTP auth requirement

    XMLWordPrintableJSON

    Details

    • Target Version/s:
    • Sprint:
      Done

      Description

      Acceptance test is failing at ozonesecure with the following error from jq:

      Example compose environments wait for datanodes to be up:

        docker-compose -f "$COMPOSE_FILE" up -d --scale datanode="${datanode_count}"
        wait_for_datanodes "$COMPOSE_FILE" "${datanode_count}"
      

      The number of datanodes up is determined via HTTP query of JMX endpoint:

           #This line checks the number of HEALTHY datanodes registered in scm over the
           # jmx HTTP servlet
           datanodes=$(docker-compose -f "${compose_file}" exec -T scm curl -s 'http://localhost:9876/jmx?qry=Hadoop:service=SCMNodeManager,name=SCMNodeManagerInfo' | jq -r '.beans[0].NodeCount[] | select(.key=="HEALTHY") | .value')
      

      The problem is that no authentication is performed before or during the request, which is no longer allowed since HDDS-1901:

      $ docker-compose exec -T scm curl -s 'http://localhost:9876/jmx?qry=Hadoop:service=SCMNodeManager,name=SCMNodeManagerInfo'
      <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
      <title>Error 401 Authentication required</title>
      </head>
      <body><h2>HTTP ERROR 401</h2>
      <p>Problem accessing /jmx. Reason:
      <pre>    Authentication required</pre></p>
      </body>
      </html>
      
      $ docker-compose exec -T scm curl -s 'http://localhost:9876/jmx?qry=Hadoop:service=SCMNodeManager,name=SCMNodeManagerInfo' | jq -r '.beans[0].NodeCount[] | select(.key=="HEALTHY") | .value'
      parse error: Invalid numeric literal at line 2, column 0
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                adoroszlai Attila Doroszlai
                Reporter:
                adoroszlai Attila Doroszlai
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h