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

Check OpenSearch compatibility version instead of regular version #22422

Merged
merged 1 commit into from Jan 5, 2023

Conversation

VyrCossont
Copy link
Contributor

@VyrCossont VyrCossont commented Dec 17, 2022

OpenSearch clusters have a version.number field in their info which reflects the actual version of OpenSearch and a version.minimum_wire_compatibility_version that reflects the version of compatible Elasticsearch clients. We should be checking the latter when connecting to an OpenSearch cluster. (Regular ES clusters don't have it.) This gets rid of a spurious warning when using the currently shipping OpenSearch 2.4.0, which is compatible with the ES 7.x that Mastodon expects.

Fixes #18535.

@@ -13,7 +13,14 @@ def pass?

def message
if running_version.present?
Admin::SystemCheck::Message.new(:elasticsearch_version_check, I18n.t('admin.system_checks.elasticsearch_version_check.version_comparison', running_version: running_version, required_version: required_version))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is only to fix a linter error about line length in this file.

@jordemort
Copy link

Just wanna chime in that I've been running OpenSearch with Mastodon for a few weeks on my small instance and it seems to be just fine, aside from the warning that this fixes.

@Gargron Gargron merged commit 06f9790 into mastodon:main Jan 5, 2023
@ClearlyClaire
Copy link
Contributor

This seems to actually cause spurious warnings with ElasticSearch 7.x, as ElasticSearch 7.x will accept clients using the 6.8 version of the protocol, thus messing with our comparison.

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.

OpenSearch support (Elasticsearch fork)
4 participants