Check OpenSearch compatibility version instead of regular version (#22422)
Fixes #18535.
This commit is contained in:
parent
ce74991bb2
commit
06f979098c
1 changed files with 10 additions and 2 deletions
|
@ -13,7 +13,14 @@ class Admin::SystemCheck::ElasticsearchCheck < Admin::SystemCheck::BaseCheck
|
||||||
|
|
||||||
def message
|
def message
|
||||||
if running_version.present?
|
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))
|
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
|
||||||
|
)
|
||||||
|
)
|
||||||
else
|
else
|
||||||
Admin::SystemCheck::Message.new(:elasticsearch_running_check)
|
Admin::SystemCheck::Message.new(:elasticsearch_running_check)
|
||||||
end
|
end
|
||||||
|
@ -23,7 +30,8 @@ class Admin::SystemCheck::ElasticsearchCheck < Admin::SystemCheck::BaseCheck
|
||||||
|
|
||||||
def running_version
|
def running_version
|
||||||
@running_version ||= begin
|
@running_version ||= begin
|
||||||
Chewy.client.info['version']['number']
|
Chewy.client.info['version']['minimum_wire_compatibility_version'] ||
|
||||||
|
Chewy.client.info['version']['number']
|
||||||
rescue Faraday::ConnectionFailed
|
rescue Faraday::ConnectionFailed
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue