Closed jeroenhabets closed 11 months ago
@jeroenhabets Exact match is required. That is a design decision made by the OpenSearch.
If you try to install plugin 2.8.0.0 into OpenSearch 2.7.0 you get the following error:
java.lang.IllegalArgumentException: Plugin [prometheus-exporter] was built for OpenSearch version 2.8.0 but version 2.7.0 is running
Complete example:
% ./bin/opensearch-plugin install https://github.com/aiven/prometheus-exporter-plugin-for-opensearch/releases/download/2.8.0.0/prometheus-exporter-2.8.0.0.zip
-> Installing https://github.com/aiven/prometheus-exporter-plugin-for-opensearch/releases/download/2.8.0.0/prometheus-exporter-2.8.0.0.zip
-> Downloading https://github.com/aiven/prometheus-exporter-plugin-for-opensearch/releases/download/2.8.0.0/prometheus-exporter-2.8.0.0.zip
[=================================================] 100%
-> Failed installing https://github.com/aiven/prometheus-exporter-plugin-for-opensearch/releases/download/2.8.0.0/prometheus-exporter-2.8.0.0.zip
-> Rolling back https://github.com/aiven/prometheus-exporter-plugin-for-opensearch/releases/download/2.8.0.0/prometheus-exporter-2.8.0.0.zip
-> Rolled back https://github.com/aiven/prometheus-exporter-plugin-for-opensearch/releases/download/2.8.0.0/prometheus-exporter-2.8.0.0.zip
Exception in thread "main" java.lang.IllegalArgumentException: Plugin [prometheus-exporter] was built for OpenSearch version 2.8.0 but version 2.7.0 is running
at org.opensearch.plugins.PluginsService.verifyCompatibility(PluginsService.java:395)
at org.opensearch.plugins.InstallPluginCommand.loadPluginInfo(InstallPluginCommand.java:820)
at org.opensearch.plugins.InstallPluginCommand.installPlugin(InstallPluginCommand.java:875)
at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:275)
at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:249)
at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:104)
at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
at org.opensearch.cli.MultiCommand.execute(MultiCommand.java:104)
at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
at org.opensearch.cli.Command.main(Command.java:101)
at org.opensearch.plugins.PluginCli.main(PluginCli.java:60)
Hope this answers your question.
Thanks, all clear @lukas-vlcek !
P.S. my suggestion to add a remark seems to be only needed for admins like me not very familiar with OpenSearch plugins, as OpenSearch PluginsService.java only supports an exact match.
@jeroenhabets Do you want to draft a documentation update PR?
@lukas-vlcek as you wish: https://github.com/aiven/prometheus-exporter-plugin-for-opensearch/pull/198
A NOTE like I added to the README.md there would have preemptively answered my question, though as previously admitted I have 0 experience with OpenSearch plugins... So if you feel it's overkill feel free to reject it.
Hi,
With regards to your Compatibility Matrix; do you have to match exactly the plugin version to the OpenSearch version? Or is it the minimum plugin version intended?
E.g. does the below mean Plugin 2.8.0.0 will support all version up to 2.8.0 and I can also use it for 2.7.0?
Or do we need to update the plugin every time AWS releases an update? (i.e. keep them strictly in sync)
Although I would read the current Compatibility Matrix as indicating keep strictly in sync, it would be helpful to clarify this by adding a remark to the [README.md]((https://github.com/aiven/prometheus-exporter-plugin-for-opensearch/blob/main/README.md)
Cheers, Jeroen