-
Notifications
You must be signed in to change notification settings - Fork 75
Description
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:
- Clone performance-analyzer (the Performance Analyzer plugin) and the performance-analyzer-rca (the Performance Analyzer agent) into the same directory.
- In the
performance-analyzer-rcarun./gradlew enableRcato spin up a docker cluster running OpenSearch 1.0.0 beta1 and a local build of the Performance Analyzer plugin - Connect to the
opensearch1docker container (docker exec -it $container_id bash) - 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