-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Disallow composable index template that have both data stream and aliases definitions #67886
Merged
martijnvg
merged 6 commits into
elastic:master
from
martijnvg:template_with_aliases_and_data_stream
Jan 27, 2021
Merged
Disallow composable index template that have both data stream and aliases definitions #67886
martijnvg
merged 6 commits into
elastic:master
from
martijnvg:template_with_aliases_and_data_stream
Jan 27, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ases definition. Index aliases are not allowed to refer to backing indices of data streams. Adding an alias that points to a backing index results into a validation error. However when defining aliases and a data stream definition on an index template, it is still possible to for aliases that refer to backing indices to be created when a data stream or new backing index is created. This change add additional validation that prevents defining aliases and data stream definition together in a composable index template or component templates that are referred by an composable index template. This should fix the mentioned bug. This checks only enables this validation when adding/updating a composable index and component template. There may be templates in the wild that have both data stream and aliases definitions, so we currently can't fail cluster states that contain aliases that refer to backing indices. So instead a warning header is emitted. Closes elastic#67730
martijnvg
added
>bug
v8.0.0
:Data Management/Data streams
Data streams and their lifecycles
v7.11.0
v7.12.0
labels
Jan 25, 2021
elasticmachine
added
the
Team:Data Management
Meta label for data/management team
label
Jan 25, 2021
Pinging @elastic/es-core-features (Team:Core/Features) |
danhermann
approved these changes
Jan 27, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once the failing test is resolved. It looks like it needs to account for both header warnings?
Yes, I forgot to update the test. |
martijnvg
added a commit
to martijnvg/elasticsearch
that referenced
this pull request
Jan 27, 2021
…ases definitions Backport of elastic#67886 to 7.x branch. Index aliases are not allowed to refer to backing indices of data streams. Adding an alias that points to a backing index results into a validation error. However when defining aliases and a data stream definition on an index template, it is still possible to for aliases that refer to backing indices to be created when a data stream or new backing index is created. This change add additional validation that prevents defining aliases and data stream definition together in a composable index template or component templates that are referred by an composable index template. This should fix the mentioned bug. This checks only enables this validation when adding/updating a composable index and component template. There may be templates in the wild that have both data stream and aliases definitions, so we currently can't fail cluster states that contain aliases that refer to backing indices. So instead a warning header is emitted. Closes elastic#67730
martijnvg
added a commit
to martijnvg/elasticsearch
that referenced
this pull request
Jan 27, 2021
…ases definitions Backport of elastic#67886 to 7.11 branch. Index aliases are not allowed to refer to backing indices of data streams. Adding an alias that points to a backing index results into a validation error. However when defining aliases and a data stream definition on an index template, it is still possible to for aliases that refer to backing indices to be created when a data stream or new backing index is created. This change add additional validation that prevents defining aliases and data stream definition together in a composable index template or component templates that are referred by an composable index template. This should fix the mentioned bug. This checks only enables this validation when adding/updating a composable index and component template. There may be templates in the wild that have both data stream and aliases definitions, so we currently can't fail cluster states that contain aliases that refer to backing indices. So instead a warning header is emitted. Closes elastic#67730
martijnvg
added a commit
that referenced
this pull request
Jan 28, 2021
…ases definitions (#68069) Backport of #67886 to 7.x branch. Index aliases are not allowed to refer to backing indices of data streams. Adding an alias that points to a backing index results into a validation error. However when defining aliases and a data stream definition on an index template, it is still possible to for aliases that refer to backing indices to be created when a data stream or new backing index is created. This change add additional validation that prevents defining aliases and data stream definition together in a composable index template or component templates that are referred by an composable index template. This should fix the mentioned bug. This checks only enables this validation when adding/updating a composable index and component template. There may be templates in the wild that have both data stream and aliases definitions, so we currently can't fail cluster states that contain aliases that refer to backing indices. So instead a warning header is emitted. Closes #67730
martijnvg
added a commit
that referenced
this pull request
Jan 28, 2021
…ases definitions (#68070) Backport of #67886 to 7.11 branch. Index aliases are not allowed to refer to backing indices of data streams. Adding an alias that points to a backing index results into a validation error. However when defining aliases and a data stream definition on an index template, it is still possible to for aliases that refer to backing indices to be created when a data stream or new backing index is created. This change add additional validation that prevents defining aliases and data stream definition together in a composable index template or component templates that are referred by an composable index template. This should fix the mentioned bug. This checks only enables this validation when adding/updating a composable index and component template. There may be templates in the wild that have both data stream and aliases definitions, so we currently can't fail cluster states that contain aliases that refer to backing indices. So instead a warning header is emitted. Closes #67730
martijnvg
added a commit
to martijnvg/elasticsearch
that referenced
this pull request
Jan 29, 2021
martijnvg
added a commit
to martijnvg/elasticsearch
that referenced
this pull request
Jan 29, 2021
This commit removes the ignore failure logic if an alias points to a backing index. This was added so that clusters upgrading from 7.9 and 7.10 to a newer version wouldn't immediately fail. Relates to elastic#67886
martijnvg
added a commit
that referenced
this pull request
Feb 1, 2021
martijnvg
added a commit
that referenced
this pull request
Feb 1, 2021
martijnvg
added a commit
that referenced
this pull request
Feb 1, 2021
This commit removes the ignore failure logic if an alias points to a backing index. This was added so that clusters upgrading from 7.9 and 7.10 to a newer version wouldn't immediately fail. Relates to #67886
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
>bug
:Data Management/Data streams
Data streams and their lifecycles
Team:Data Management
Meta label for data/management team
v7.11.0
v7.12.0
v8.0.0-alpha1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Index aliases are not allowed to refer to backing indices of data streams.
Adding an alias that points to a backing index results into a validation error.
However when defining aliases and a data stream definition on an index template,
it is still possible to for aliases that refer to backing indices to be created
when a data stream or new backing index is created.
This change add additional validation that prevents defining aliases and data
stream definition together in a composable index template or component templates
that are referred by an composable index template. This should fix the mentioned
bug.
This checks only enables this validation when adding/updating a composable index
and component template. There may be templates in the wild that have both
data stream and aliases definitions, so we currently can't fail cluster states
that contain aliases that refer to backing indices. So instead a warning header
is emitted.
Closes #67730