opensearch-project / opensearch-project/performance-analyzer
[BUG] Having issue to use path: /dev/shm/performanceanalyzer/ on OSX
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 48
- Forks
- 78
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 5
Description
What is the bug?
I assembled a distribution on Mac OSX (see https://github.com/opensearch-project/opensearch-build/issues/38#issuecomment-944373452) and tried running it. PA fails with Having issue to use path: /dev/shm/performanceanalyzer/, plugin is not loaded.
[2021-10-15T10:57:26,515][INFO ][o.o.p.c.PluginSettings ] [38f9d370eb4a.ant.amazon.com] Trying to create directory /dev/shm/performanceanalyzer/.
[2021-10-15T10:57:26,516][ERROR][o.o.p.c.PluginSettings ] [38f9d370eb4a.ant.amazon.com] Invalid metrics location /dev/shm/performanceanalyzer/. Created: false (Expect True), Directory: false (Expect True), CanWrite: false (Expect True)
[2021-10-15T10:57:26,517][ERROR][o.o.p.c.PluginSettings ] [38f9d370eb4a.ant.amazon.com] Having issue to load all config items. Disabling plugin.
org.opensearch.performanceanalyzer.config.ConfigFatalException: Having issue to use path: /dev/shm/performanceanalyzer/
at org.opensearch.performanceanalyzer.config.PluginSettings.validateOrCreateDir(PluginSettings.java:275) ~[performanceanalyzer-rca-1.1.0.0.jar:?]
at org.opensearch.performanceanalyzer.config.PluginSettings.loadMetricsLocationFromConfig(PluginSettings.java:253) ~[performanceanalyzer-rca-1.1.0.0.jar:?]
at org.opensearch.performanceanalyzer.config.PluginSettings.<init>(PluginSettings.java:196) [performanceanalyzer-rca-1.1.0.0.jar:?]
at org.opensearch.performanceanalyzer.config.PluginSettings.createInstance(PluginSettings.java:234) [performanceanalyzer-rca-1.1.0.0.jar:?]
at org.opensearch.performanceanalyzer.core.Util.lambda$invokePrivilegedAndLogError$3(Util.java:97) [performanceanalyzer-rca-1.1.0.0.jar:?]
at java.security.AccessController.doPrivileged(AccessController.java:312) [?:?]
at org.opensearch.performanceanalyzer.core.Util.invokePrivilegedAndLogError(Util.java:93) [performanceanalyzer-rca-1.1.0.0.jar:?]
at org.opensearch.performanceanalyzer.config.PluginSettings.<clinit>(PluginSettings.java:93) [performanceanalyzer-rca-1.1.0.0.jar:?]
at org.opensearch.performanceanalyzer.PerformanceAnalyzerPlugin.<init>(PerformanceAnalyzerPlugin.java:183) [opensearch-performance-analyzer-1.1.0.0.jar:1.1.0.0]
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64) ~[?:?]
at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500) ~[?:?]
at java.lang.reflect.Constructor.newInstance(Constructor.java:481) ~[?:?]
at org.opensearch.plugins.PluginsService.loadPlugin(PluginsService.java:727) [opensearch-1.1.0.jar:1.1.0]
at org.opensearch.plugins.PluginsService.loadBundle(PluginsService.java:672) [opensearch-1.1.0.jar:1.1.0]
at org.opensearch.plugins.PluginsService.loadBundles(PluginsService.java:492) [opensearch-1.1.0.jar:1.1.0]
at org.opensearch.plugins.PluginsService.<init>(PluginsService.java:181) [opensearch-1.1.0.jar:1.1.0]
at org.opensearch.node.Node.<init>(Node.java:357) [opensearch-1.1.0.jar:1.1.0]
at org.opensearch.node.Node.<init>(Node.java:301) [opensearch-1.1.0.jar:1.1.0]
at org.opensearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:240) [opensearch-1.1.0.jar:1.1.0]
at org.opensearch.bootstrap.Bootstrap.setup(Bootstrap.java:240) [opensearch-1.1.0.jar:1.1.0]
at org.opensearch.bootstrap.Bootstrap.init(Bootstrap.java:406) [opensearch-1.1.0.jar:1.1.0]
at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:182) [opensearch-1.1.0.jar:1.1.0]
at org.opensearch.bootstrap.OpenSearch.execute(OpenSearch.java:173) [opensearch-1.1.0.jar:1.1.0]
at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:99) [opensearch-1.1.0.jar:1.1.0]
at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:140) [opensearch-cli-1.1.0.jar:1.1.0]
at org.opensearch.cli.Command.main(Command.java:103) [opensearch-cli-1.1.0.jar:1.1.0]
at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:139) [opensearch-1.1.0.jar:1.1.0]
at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:105) [opensearch-1.1.0.jar:1.1.0]
[2021-10-15T10:57:26,524][INFO ][o.o.p.c.PluginSettings ] [38f9d370eb4a.ant.amazon.com] Config: metricsLocation: /dev/shm/performanceanalyzer/, metricsDeletionInterval: 1, httpsEnabled: false, cleanup-metrics-db-files: false, batch-metrics-retention-period-minutes: 7, rpc-port: 9650, webservice-port 9600
A clear and concise description of the bug.
How can one reproduce the bug?
Usng opensearch-build:
./build.sh manifests/1.1.0/opensearch-1.1.0.manifest.yml
./assemble.sh artifacts/manifest.yml
cd artifacts
./opensearch-tar-install.sh
What is the expected behavior?
Plugin should work on OSX.
What is your host/environment?
- Darwin MacOS x86_64
- Big Sur 11.4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in PluginSettings.java at validateOrCreateDir and loadMetricsLocationFromConfig, using the stack trace and logged metricsLocation as the entry points. Reproduce with the listed opensearch-build and assembly commands on macOS, then verify that the Performance Analyzer plugin loads and its metrics directory is valid instead of disabling the plugin.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100