Aiven-Open / prometheus-exporter-plugin-for-opensearch

Prometheus exporter plugin for OpenSearch & OpenSearch Mixin
Apache License 2.0
110 stars 34 forks source link

Question: Do you have to match plugin to OpenSearch version? Compatibility Matrix #197

Closed jeroenhabets closed 11 months ago

jeroenhabets commented 12 months ago

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?

OpenSearch Plugin Release date
2.8.0 2.8.0.0 Jun 13, 2023
2.7.0 2.7.0.0 May 10, 2023

Or do we need to update the plugin every time AWS releases an update? (i.e. keep them strictly in sync)

OpenSearch Plugin Release date
1.3.11 1.3.11.0 Jul 06, 2023
1.3.10 1.3.10.0 May 23, 2023
1.3.9 1.3.9.0 Mar 20, 2023

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

lukas-vlcek commented 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.

jeroenhabets commented 11 months ago

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.

lukas-vlcek commented 11 months ago

@jeroenhabets Do you want to draft a documentation update PR?

jeroenhabets commented 11 months ago

@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.

jeroenhabets commented 11 months ago

Resolved by PR https://github.com/aiven/prometheus-exporter-plugin-for-opensearch/pull/204