Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading to OpenSearch 1.3.1 #13

Closed
wants to merge 2 commits into from

Conversation

onelapahead
Copy link

When upgrading to the latest the OpenSearch helm chart (1.10.2), getting this error:

-> Installing https://github.com/aparo/opensearch-prometheus-exporter/releases/download/1.2.4/prometheus-exporter-1.2.4.zip
-> Downloading https://github.com/aparo/opensearch-prometheus-exporter/releases/download/1.2.4/prometheus-exporter-1.2.4.zip
-> Failed installing https://github.com/aparo/opensearch-prometheus-exporter/releases/download/1.2.4/prometheus-exporter-1.2.4.zip
-> Rolling back https://github.com/aparo/opensearch-prometheus-exporter/releases/download/1.2.4/prometheus-exporter-1.2.4.zip
-> Rolled back https://github.com/aparo/opensearch-prometheus-exporter/releases/download/1.2.4/prometheus-exporter-1.2.4.zip
Exception in thread "main" java.lang.IllegalArgumentException: Plugin [prometheus-exporter] was built for OpenSearch version 1.2.4 but version 1.3.1 is running
        at org.opensearch.plugins.PluginsService.verifyCompatibility(PluginsService.java:392)
        at org.opensearch.plugins.InstallPluginCommand.loadPluginInfo(InstallPluginCommand.java:815)
        at org.opensearch.plugins.InstallPluginCommand.installPlugin(InstallPluginCommand.java:870)
        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:100)
        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)

Hoping simply bumping the version for the gradle build is all thats required. Will comment on this PR with the results of my initial testing.

Signed-off-by: hfuss <haydenfuss@gmail.com>
@onelapahead
Copy link
Author

Initial build failed due to:

* Where:
Build file '/home/runner/work/opensearch-prometheus-exporter/opensearch-prometheus-exporter/build.gradle' line: 35

* What went wrong:
A problem occurred evaluating root project 'prometheus-exporter'.
> Failed to apply plugin class 'org.opensearch.gradle.info.GlobalBuildInfoPlugin'.
   > Could not create plugin of type 'GlobalBuildInfoPlugin'.
      > Could not generate a decorated class for type GlobalBuildInfoPlugin.
         > org/gradle/jvm/toolchain/JavaInstallation

looking at opensearch-project/k-NN#306 for some inspiration.

Signed-off-by: hfuss <haydenfuss@gmail.com>
@onelapahead
Copy link
Author

After some digging, found that OpenSearch builds do not support Gradle 7.x for 1.x: opensearch-project/OpenSearch#1246

Gradle 7.x support will be released with OpenSearch 2.x instead. So downgrading to Gradle 6.9.2 required to then downgrade to Java 11 (most recent Java LTS version supported by Grade 6.x).

From there, the Prometheus client does not pass the various dependency licenses check, third party audits, etc. so I disabled all of them and successfully published a 1.3.1 release to my fork:

For those using the Helm chart, you can use my published release in the interim like so:

    plugins:
      enabled: true
      installList:
        - https://github.com/hfuss/opensearch-prometheus-exporter/releases/download/1.3.1/prometheus-exporter-1.3.1.zip

Looking at the default Grafana dashboard it looks like most metrics are working (unclear why network usage isn't showing up):

Screen Shot 2022-05-03 at 4 45 31 PM

Though for now this is good enough for me. Will wait for some feedback from the maintainer(s).

@rursprung
Copy link

AFAIK this repo isn't maintained anymore, it has been transferred here: https://github.com/aiven/prometheus-exporter-plugin-for-opensearch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants