Skip to content

[BUG] Performance Analyzer plugin not reachable at /_plugins after following upgrade guide #19

@jotok

Description

@jotok

Describe the bug

We followed the upgrade guide to rename our plugin URIs to appear under the /_plugins resource instead of the /_opendistro resource. See ca460f. However when we perform manual tests, we're not able to reach the plugin via the /_plugins resource. For example, on a docker container running OpenSearch 1.0.0-beta1 (obtained from the artifacts.opensearch.org, if we see the following behavior:

Requeting the old /_opendistro resource:

# curl "localhost:9600/_opendistro/_performanceanalyzer/metrics?metrics=CPU_Utilization&agg=avg&nodes=all"
{"8WVPCeEhTQK9Bl9Jn_qkTw": {"timestamp": 1621627400000, "data": {"fields":[{"name":"CPU_Utilization","type":"DOUBLE"}],"records":[]}}, "umX7FiMWRxqUczmfzvRw_g" :{"timestamp": 1621627400000, "data": {"fields":[{"name":"CPU_Utilization","type":"DOUBLE"}],"records":[]}}}

Requestiong the /_plugins resource:

# curl "localhost:9600/_plugins/_performanceanalyzer/metrics?metrics=CPU_Utilization&agg=avg&nodes=all
<h1>404 Not Found</h1>No context found for request

The Performance Analyzer Agent and perftop make calls to the Performance Analyzer plugin API. We can't update those packages to use /_plugins instead of /_opendistro until this issue is fixed.

To Reproduce
Steps to reproduce the behavior:

  1. Clone performance-analyzer (the Performance Analyzer plugin) and the performance-analyzer-rca (the Performance Analyzer agent) into the same directory.
  2. In the performance-analyzer-rca run ./gradlew enableRca to spin up a docker cluster running OpenSearch 1.0.0 beta1 and a local build of the Performance Analyzer plugin
  3. Connect to the opensearch1 docker container (docker exec -it $container_id bash)
  4. Execute the following commands at the container prompt:
  • curl "localhost:9600/_opendistro/_performanceanalyzer/metrics?metrics=CPU_Utilization&agg=avg&nodes=all"
  • curl "localhost:9600/_plugins/_performanceanalyzer/metrics?metrics=CPU_Utilization&agg=avg&nodes=all

Expected behavior
Both requests result in an HTTP 200 and a response body describing CPU Utilization

Plugins
Please list all plugins currently enabled.

Host/Environment (please complete the following information):

  • OS: MacOS
  • Catalina
  • Docker version 20.10.2, build 2291f61

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions