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

Add MainResponse version override as a cluster setting. #847

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

mch2
Copy link
Member

@mch2 mch2 commented Jun 15, 2021

Signed-off-by: Marc Handalian handalm@amazon.com

Description

This PR addresses #693 by using a cluster setting instead of a system property suggested by 814

This setting is intended to be set after a rolling upgrade via the cluster settings API.

PUT /_cluster/settings
{
  "compatibility" : {
    "override_main_response_version" : true
  }
}

It can be turned off with the same request with a value of false.

A default value for this setting may also be configured via opensearch.yml. If not present, it defaults to false.

Issues Resolved

#693

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@opensearch-ci-bot
Copy link
Collaborator

✅   DCO Check Passed d694a20722e5fb96bfc5cadf814ff7c841b14a22

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success d694a20722e5fb96bfc5cadf814ff7c841b14a22

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Precommit success d694a20722e5fb96bfc5cadf814ff7c841b14a22

@peterzhuamazon
Copy link
Member

start gradle check

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success d694a20722e5fb96bfc5cadf814ff7c841b14a22
Log 240

Reports 240

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

LGTM

@mch2
Copy link
Member Author

mch2 commented Jun 17, 2021

Made an update here to improve the commit message

@opensearch-ci-bot
Copy link
Collaborator

✅   DCO Check Passed eaf0cf2645ebb1af43b3088aa923c0b1fcb9104e

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success eaf0cf2645ebb1af43b3088aa923c0b1fcb9104e

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Precommit success eaf0cf2645ebb1af43b3088aa923c0b1fcb9104e

@CEHENKLE
Copy link
Member

start gradle check

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success eaf0cf2645ebb1af43b3088aa923c0b1fcb9104e
Log 246

Reports 246

@mch2
Copy link
Member Author

mch2 commented Jun 18, 2021

@nknize thoughts on this?

Copy link
Collaborator

@nknize nknize left a comment

Choose a reason for hiding this comment

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

this looks great. I just threw one small suggestion so we don't lose the task of removing this in 2.0.0 (which is currently the main branch)

This change adds a new cluster setting "compatibility.override_main_response_version"
that when enabled spoofs the version.number returned from MainResponse
for REST clients expecting legacy version 7.10.2.

Signed-off-by: Marc Handalian <handalm@amazon.com>
@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success 1d959ba

@opensearch-ci-bot
Copy link
Collaborator

✅   DCO Check Passed 1d959ba

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Precommit success 1d959ba

@CEHENKLE
Copy link
Member

start gradle check

@nknize nknize added enhancement Enhancement or improvement to existing feature or request v1.0.0 Version 1.0.0 v2.0.0 Version 2.0.0 Severity-Blocker v1.1.0 Issues, PRs, related to the 1.1.0 release labels Jun 22, 2021
@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 1d959ba
Log 248

Reports 248

@CEHENKLE CEHENKLE merged commit c1250c9 into opensearch-project:main Jun 22, 2021
mch2 added a commit to mch2/OpenSearch that referenced this pull request Jun 22, 2021
opensearch-project#847)

This change adds a new cluster setting "compatibility.override_main_response_version"
that when enabled spoofs the version.number returned from MainResponse
for REST clients expecting legacy version 7.10.2.

Signed-off-by: Marc Handalian <handalm@amazon.com>
mch2 added a commit to mch2/OpenSearch that referenced this pull request Jun 22, 2021
opensearch-project#847)

This change adds a new cluster setting "compatibility.override_main_response_version"
that when enabled spoofs the version.number returned from MainResponse
for REST clients expecting legacy version 7.10.2.

Signed-off-by: Marc Handalian <handalm@amazon.com>
nknize pushed a commit that referenced this pull request Jun 22, 2021
#847) (#870)

This change adds a new cluster setting "compatibility.override_main_response_version"
that when enabled spoofs the version.number returned from MainResponse
for REST clients expecting legacy version 7.10.2.

Signed-off-by: Marc Handalian <handalm@amazon.com>
nknize pushed a commit that referenced this pull request Jun 22, 2021
#847) (#870)

This change adds a new cluster setting "compatibility.override_main_response_version"
that when enabled spoofs the version.number returned from MainResponse
for REST clients expecting legacy version 7.10.2.

Signed-off-by: Marc Handalian <handalm@amazon.com>
@mch2 mch2 deleted the 693-clustersetting branch August 31, 2021 18:44
@shdubsh shdubsh mentioned this pull request Oct 8, 2021
@gittygoo
Copy link

gittygoo commented Feb 7, 2022

just tried using this to connect Kibana with opensearch and getting the following on kibana

This version of Kibana is incompatible with the following Elasticsearch nodes in your cluster: v1.2.4 @ XXX.1.80:9200 (XXX.1.80), v1.2.4 @ XXX.2.133:9200 (XXX.2.133), v1.2.4 @ XXX.0.15:9200 (XXX.0.15)

Note the version v1.2.4 is still being "seen" by kibana, wasnt it supposed to show something like 7.10.xxx ?

When calling a GET on / to opensearch directly i see "version" : { "number" : "7.10.2",

When calling a GET on "/_nodes?filter_path=nodes..version%2Cnodes..http.publish_address%2Cnodes.*.ip" which seems to be the check that kibana is doing then i get the following (note the versions 1.2.4):

{"nodes":{"XXXXXXXXXXXXX":{"ip":"XXXXXXX.2.133","version":"1.2.4","http":{"publish_address":"XXXXXXX.2.133:9200"}},"XXXXXXX":{"ip":"XXXXXXX.0.15","version":"1.2.4","http":{"publish_address":"XXXXXXX.0.15:9200"}},"XXXXXXX":{"ip":"XXXXXXX.1.80","version":"1.2.4","http":{"publish_address":"XXXXXXX.1.80:9200"}}}}

@dblock
Copy link
Member

dblock commented Feb 7, 2022

@gittygoo What version of Kibana are you trying to run?

Generally, I wouldn't recommend running any version of Kibana on top of OpenSearch, even if we are able to change the version number returned here, this is an untested combination.

@gittygoo
Copy link

gittygoo commented Feb 7, 2022

@dblock I understand that but i still need to run kibana since there is currently no package of wazuh for opensearch. Hence why i'm trying this. I tried with kibana 7.9 and 7.10.

Either way i guess these numbers should be changed so that this issue is correctly applied to all relevant endpoints

@dblock
Copy link
Member

dblock commented Feb 7, 2022

@gittygoo Reopen a new issue? I suspect that changing the version in nodes response is going to do other bad things :(

Note wazuh/wazuh-dashboard-plugins#3644 specifically re:Wazuh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request Severity-Blocker v1.0.0 Version 1.0.0 v1.1.0 Issues, PRs, related to the 1.1.0 release v2.0.0 Version 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants