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

Rename settings from OpenDistro and OpenSearch, with backwards compatibility, using upgraders #19

Closed
wants to merge 1 commit into from

Conversation

dblock
Copy link
Member

@dblock dblock commented May 4, 2021

Signed-off-by: dblock [email protected]

Description

  1. Rename setting from opendistro to opensearch.
  2. Provide backwards compatibility for opendistro settings.
  3. TODO: tests

Depends on opensearch-project/OpenSearch#643

Manually testing this:

Install OpenDistro

wget https://d3g5vo6xdbdb9a.cloudfront.net/tarball/opendistro-elasticsearch/opendistroforelasticsearch-1.13.2-linux-x64.tar.gz
tar vfxz opendistroforelasticsearch-1.13.2-linux-x64.tar.gz
cd opendistroforelasticsearch-1.13.2
./bin/elasticsearch

Set opendistro.jobscheduler.retry_count: 6.

curl -X PUT "localhost:9200/_cluster/settings?pretty" -H 'Content-Type: application/json' -d'{"persistent":{"opendistro.jobscheduler.retry_count":6}}'

Stop OpenDistro, install OpenSearch on top (or copy data). I built just the minimal engine + job-scheduler from source with these changes.

tar vfxz opensearch-1.0.0-beta1-linux-x64.tar.gz 
cd opensearch-1.0.0-beta1
./bin/opensearch-plugin install opensearch-job-scheduler-1.0.0.0-beta1.zip 
rm -rf data
cp -R ../opendistroforelasticsearch-1.13.2/data .

See it.

[2021-05-04T19:54:40,637][INFO ][o.o.c.s.ClusterSettings  ] [ip-172-31-41-248] updating [opensearch.jobscheduler.retry_count] from [3] to [6]
[2021-05-04T19:54:40,637][INFO ][c.a.o.j.s.JobSweeper     ] [ip-172-31-41-248] Setting background sweep search backoff retry count: 6

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.

@dblock dblock force-pushed the upgrade-settings branch 3 times, most recently from d8b13a6 to cb6f481 Compare May 4, 2021 20:46
@dblock dblock force-pushed the upgrade-settings branch from cb6f481 to ba438c6 Compare May 4, 2021 20:47
@dblock dblock changed the title Rename settings from OpenDistro and OpenSearch, with backwards compatibility WIP: Rename settings from OpenDistro and OpenSearch, with backwards compatibility May 4, 2021
@dblock dblock changed the title WIP: Rename settings from OpenDistro and OpenSearch, with backwards compatibility Rename settings from OpenDistro and OpenSearch, with backwards compatibility, using upgraders May 6, 2021
@dblock
Copy link
Member Author

dblock commented May 6, 2021

I think upgraders are overkill and we can just use fallback, closing in favor of #20.

@dblock dblock closed this May 6, 2021
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.

1 participant