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

Use OpenSearch constants while still supporting OpenDistro #877

Open
dlvenable opened this issue Jan 14, 2022 · 4 comments
Open

Use OpenSearch constants while still supporting OpenDistro #877

dlvenable opened this issue Jan 14, 2022 · 4 comments
Labels

Comments

@dlvenable
Copy link
Member

Is your feature request related to a problem? Please describe.

Data Prepper's opensearch plugin currently supports both OpenSearch 1.0 clusters and OpenDistro Elasticsearch 7.10 clusters. It supports both by using "opendistro" APIs, indices, and property names.

Examples:

All the constants are available by searching for opendistro.

These should be replaced with the new values in OpenSearch.

Describe the solution you'd like

Data Prepper can determine the cluster type. It can do this by making an initial request to the main endpoint (/) and getting the distribution value. Then it uses the correct constants.

We would need to verify if this will work for early versions of OpenSearch (say, 1.0.0). Do these versions all use the new strings?

Describe alternatives you've considered (Optional)

Configuration
A relatively simple solution is adding a property to the opensearch plugin which determines if it supports opendistro or opensearch. Then these usages will vary depending on the cluster type.

Example:

sink:
  opensearch:
    hosts: ["https://localhost:9200"]
    distribution: opendistro

In the 1.x series of Data Prepper, the default should be opendistro since this is the current behavior (it will continue to work with OpenSearch 1.x clusters). But, in Data Prepper 2.x, the default should be opensearch.

Split Plugins

The opensearch plugin could be split into both opensearch and opendistro plugins. This might be necessary in the long-term depending on much these implementations must differ. But, I don't believe it is necessary presently.

@dlvenable
Copy link
Member Author

OpenSearch 2.0 is currently scheduled for "early 2022" per the roadmap. I'm unsure if these "opendistro" strings will be removed or not. But, Data Prepper should get ahead of that possibility.

@dlvenable
Copy link
Member Author

This is an interesting use-case in which using the distribution property may not always work: opensearch-project/logstash-output-opensearch#62

Basically, some other products provide OpenSearch-like endpoints, but are neither OpenSearch nor Elasticsearch clusters. As such, the distribution should not be opensearch. Indeed, Data Prepper has a goal to support this as well - #248.

@dlvenable dlvenable changed the title Correct OpenSearch plugins constants Use OpenSearch constants while supporting OpenDistro Feb 21, 2022
@dlvenable dlvenable changed the title Use OpenSearch constants while supporting OpenDistro Use OpenSearch constants while still supporting OpenDistro Feb 21, 2022
@dlvenable dlvenable mentioned this issue Apr 13, 2022
4 tasks
@dlvenable
Copy link
Member Author

OpenSearch is not removing these constant values until OpenSearch 3.0.

opensearch-project/opensearch-plugins#128

Data Prepper thus does not need to resolve this issue to support OpenSearch 2.0.

@dlvenable dlvenable added this to the v2.0 milestone Apr 18, 2022
@dlvenable dlvenable added breaking change Any change which may break existing configurations and deployments and removed untriaged labels Apr 18, 2022
@dlvenable
Copy link
Member Author

I added the breaking change tag because some solutions may require a breaking change. We can remove this tag if we decide to take a more dynamic approach.

Since OpenSearch 2.0 will continue to support the old values, Data Prepper can continue to use the old values for now.

@dlvenable dlvenable added backlog and removed breaking change Any change which may break existing configurations and deployments labels Aug 18, 2022
@dlvenable dlvenable removed this from the v2.0 milestone Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

1 participant