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 option to filter ILM explain response #44777

Merged
merged 6 commits into from
Jul 25, 2019

Conversation

gwbrown
Copy link
Contributor

@gwbrown gwbrown commented Jul 23, 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.

Closes #44189

gwbrown added 5 commits July 23, 2019 14:20
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.
@gwbrown gwbrown added >enhancement :Data Management/ILM+SLM Index and Snapshot lifecycle management v8.0.0 v7.4.0 labels Jul 23, 2019
@gwbrown gwbrown requested a review from dakrone July 23, 2019 23:05
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

@@ -21,13 +23,48 @@
* {@link #indices(String...)} method
*/
public class ExplainLifecycleRequest extends ClusterInfoRequest<ExplainLifecycleRequest> {
private static final Version FILTERS_INTRODUCED_VERSION = Version.V_8_0_0;
Copy link
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
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.

@gwbrown
Copy link
Contributor Author

gwbrown commented Jul 23, 2019

@elasticmachine run elasticsearch-ci/1

Opened #44778 for the failure.

Copy link
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.

@gwbrown
Copy link
Contributor Author

gwbrown commented Jul 24, 2019

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

@gwbrown gwbrown merged commit 5f0861a into elastic:master Jul 25, 2019
gwbrown added a commit to gwbrown/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.
gwbrown 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ILM: Additional filtering options for ILM explain API
4 participants