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 clear deprecation around legacy role settings #71143

Merged

Conversation

jasontedor
Copy link
Member

@jasontedor jasontedor commented Mar 31, 2021

We've deprecated the legacy role settings. Individually, when you use such a setting, you will get an individual log message informing you that you've used a legacy role setting. What the deprecation does not tell you though, is the equivalent node.roles setting that you should be using to achieve identical functionality to what you have today. This creates a bad user experience. Suppose that you've configured a node (e.g., node.data: true, node.ingest: false, node.master: false, node.remote_cluster_client: false), but never explicitly set the legacy node.transform setting. In this case, we'll use the default value of true. You see the deprecation message informing you that node.data, node.ingest, node.master, and node.remote_cluster_client are deprecated. So you do some searching in the docs and discover the node.roles setting. So you dutifully set node.roles: [data] because this is the only legacy role setting that you've enabled. Well, now you're having a bad time because this will also disable the transform role, which was implicitly enabled. This commit provides a cleared deprecation message in this case:

legacy role settings [node.data, node.ingest, node.remote_cluster_client, node.master] are deprecated, use [node.roles=[transform, data_frozen, data_hot, data_content, data_warm, data, data_cold]

This should help users transition between the legacy role settings and the new role setting.

Relates #54998

@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Mar 31, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@jasontedor jasontedor force-pushed the legacy-node-settings-deprecation branch from 594d2b2 to 50776d8 Compare March 31, 2021 19:06
We've deprecated the legacy role settings. Individually, when you use
such a setting, you will get an individual log message informing you
that you've used a legacy role setting. What the deprecation does not
tell you though, is the equivalent node.roles setting that you should be
using to achieve identical functionality to what you have today. This
creates a bad user experience. Suppose that you've configured a node
(e.g., node.data: true, node.ingest: false, node.master: false,
node.remote_cluster_client: false), but never explicitly set the legacy
node.transform setting. In this case, we'll use the default value of
true. You see the deprecation message informing you that node.data,
node.ingest, node.master, and node.remote_cluster_client are
deprecated. So you do some searching in the docs and discover the
node.roles setting. So you dutifully set node.roles: [data] because this
is the only legacy role setting that you've enabled. Well, now you're
having a bad time because this will also disable the transform role,
which was implicitly enabled. This commit provides a cleared deprecation
message in this case:

legacy role settings [node.data, node.ingest,
node.remote_cluster_client, node.master] are deprecated, use
[node.roles=[transform, data_frozen, data_hot, data_content, data_warm,
data, data_cold]

This should help users transition between the legacy role settings and
the new role setting.
@jasontedor jasontedor force-pushed the legacy-node-settings-deprecation branch from 50776d8 to 77136ef Compare March 31, 2021 19:07
Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

LGTM

@jasontedor
Copy link
Member Author

@elasticmachine update branch

@jasontedor
Copy link
Member Author

The failing test here is #71147, so I've updated my branch to pull in the latest commits that address the failures there.

@jasontedor jasontedor merged commit 3d784f8 into elastic:master Apr 1, 2021
jasontedor added a commit that referenced this pull request Apr 1, 2021
We've deprecated the legacy role settings. Individually, when you use
such a setting, you will get an individual log message informing you
that you've used a legacy role setting. What the deprecation does not
tell you though, is the equivalent node.roles setting that you should be
using to achieve identical functionality to what you have today. This
creates a bad user experience. Suppose that you've configured a node
(e.g., node.data: true, node.ingest: false, node.master: false,
node.remote_cluster_client: false), but never explicitly set the legacy
node.transform setting. In this case, we'll use the default value of
true. You see the deprecation message informing you that node.data,
node.ingest, node.master, and node.remote_cluster_client are
deprecated. So you do some searching in the docs and discover the
node.roles setting. So you dutifully set node.roles: [data] because this
is the only legacy role setting that you've enabled. Well, now you're
having a bad time because this will also disable the transform role,
which was implicitly enabled. This commit provides a cleared deprecation
message in this case:

legacy role settings [node.data, node.ingest,
node.remote_cluster_client, node.master] are deprecated, use
[node.roles=[transform, data_frozen, data_hot, data_content, data_warm,
data, data_cold]

This should help users transition between the legacy role settings and
the new role setting.
@jasontedor jasontedor deleted the legacy-node-settings-deprecation branch April 1, 2021 00:08
Copy link
Contributor

@przemekwitek przemekwitek left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks for fixing it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Settings Settings infrastructure and APIs >deprecation Team:Core/Infra Meta label for core/infra team v7.13.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants