Skip to content

Add option to filter ILM explain response#44777

Merged
AthenaEryma merged 6 commits intoelastic:masterfrom
AthenaEryma:rebase/ilm/explain-filters
Jul 25, 2019
Merged

Add option to filter ILM explain response#44777
AthenaEryma merged 6 commits intoelastic:masterfrom
AthenaEryma:rebase/ilm/explain-filters

Conversation

@AthenaEryma
Copy link
Copy Markdown
Contributor

In order to make it easier to interpret the output of the ILM Explain
API, this commit adds two request parameters to that API:

  • only_managed, which causes the response to only contain indices
    which have index.lifecycle.name set
  • only_errors, which causes the response to contain only indices in an
    ILM error state

"Error state" is defined as either being in the ERROR step or having
index.lifecycle.name set to a policy that does not exist.

Closes #44189

In order to make it easier to interpret the output of the ILM Explain
API, this commit adds two request parameters to that API:

- `only_managed`, which causes the response to only contain indices
  which have `index.lifecycle.name` set
- `only_errors`, which causes the response to contain only indices in an
  ILM error state

"Error state" is defined as either being in the `ERROR` step or having
`index.lifecycle.name` set to a policy that does not exist.
@AthenaEryma AthenaEryma added >enhancement :Data Management/ILM+SLM DO NOT USE. Use ":StorageEngine/ILM" or ":Distributed Coordination/SLM" instead. v8.0.0 v7.4.0 labels Jul 23, 2019
@AthenaEryma AthenaEryma requested a review from dakrone July 23, 2019 23:05
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-core-features

* {@link #indices(String...)} method
*/
public class ExplainLifecycleRequest extends ClusterInfoRequest<ExplainLifecycleRequest> {
private static final Version FILTERS_INTRODUCED_VERSION = Version.V_8_0_0;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

TODO: Update this in the backport and in master after merging the backport.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated the serialization version in a76242d now that the backport has been merged.

@AthenaEryma
Copy link
Copy Markdown
Contributor Author

@elasticmachine run elasticsearch-ci/1

Opened #44778 for the failure.

Copy link
Copy Markdown
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

This LGTM, do you think it's worth adding something to the REST tests for ILM that uses it? Up to you either way.

@AthenaEryma
Copy link
Copy Markdown
Contributor Author

Good idea @dakrone, I've added a couple basic tests.

@AthenaEryma AthenaEryma merged commit 5f0861a into elastic:master Jul 25, 2019
AthenaEryma added a commit to AthenaEryma/elasticsearch that referenced this pull request Jul 25, 2019
In order to make it easier to interpret the output of the ILM Explain
API, this commit adds two request parameters to that API:

- `only_managed`, which causes the response to only contain indices
  which have `index.lifecycle.name` set
- `only_errors`, which causes the response to contain only indices in an
  ILM error state

"Error state" is defined as either being in the `ERROR` step or having
`index.lifecycle.name` set to a policy that does not exist.
AthenaEryma added a commit that referenced this pull request Jul 26, 2019
In order to make it easier to interpret the output of the ILM Explain
API, this commit adds two request parameters to that API:

- `only_managed`, which causes the response to only contain indices
  which have `index.lifecycle.name` set
- `only_errors`, which causes the response to contain only indices in an
  ILM error state

"Error state" is defined as either being in the `ERROR` step or having
`index.lifecycle.name` set to a policy that does not exist.
jkakavas pushed a commit that referenced this pull request Jul 31, 2019
In order to make it easier to interpret the output of the ILM Explain
API, this commit adds two request parameters to that API:

- `only_managed`, which causes the response to only contain indices
  which have `index.lifecycle.name` set
- `only_errors`, which causes the response to contain only indices in an
  ILM error state

"Error state" is defined as either being in the `ERROR` step or having
`index.lifecycle.name` set to a policy that does not exist.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/ILM+SLM DO NOT USE. Use ":StorageEngine/ILM" or ":Distributed Coordination/SLM" instead. >enhancement v7.4.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ILM: Additional filtering options for ILM explain API

4 participants