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

Ensure destructive actions work independently of action.destructive_requires_name #1152

Closed
danielmitterdorfer opened this issue Jan 15, 2021 · 1 comment · Fixed by #1243
Closed
Assignees
Labels
enhancement Improves the status quo :Load Driver Changes that affect the core of the load driver such as scheduling, the measurement approach etc.
Milestone

Comments

@danielmitterdorfer
Copy link
Member

There are a couple of destructive APIs in Elasticsearch that allow wildcards (i.e. * or _all) by default (configurable with the setting action.destructive_requires_name). The default value for this setting will change with elastic/elasticsearch#66908. We have put a stop-gap solution in place in elastic/rally-teams#58 to set this value to false for all clusters that are configured by Rally. However, we should ensure that we always use explicit names in destructive actions as not all cluster might be configured by Rally. The affected APIs are:

  • Adding an index block
  • Open / close index API
  • Delete Index / data stream

Note: I am not aware that we add index block or use the open / close index APIs anywhere but I wanted to mention them for completeness.

For the delete index / data stream APIs which are supported out of the box by Rally should choose one the following approaches:

  • Temporarily set action.destructive_requires_name to false via the cluster settings API and reset it afterwards.
  • Resolve index names containing patterns via an API call and enumerate all index names explicitly.

When we have implemented support in Rally, we should also revert the stop gap solution implemented in elastic/rally-teams#58 after a short grace period.

@danielmitterdorfer danielmitterdorfer added enhancement Improves the status quo :Load Driver Changes that affect the core of the load driver such as scheduling, the measurement approach etc. labels Jan 15, 2021
@danielmitterdorfer danielmitterdorfer added this to the 2.0.4 milestone Jan 15, 2021
@danielmitterdorfer
Copy link
Member Author

@DJRickyB can you please have a look at this one?

@DJRickyB DJRickyB self-assigned this Jan 15, 2021
@danielmitterdorfer danielmitterdorfer modified the milestones: 2.0.4, 2.1.0 Feb 3, 2021
@ebadyano ebadyano modified the milestones: 2.1.0, 2.2.0 Mar 31, 2021
@danielmitterdorfer danielmitterdorfer modified the milestones: 2.2.0, 2.1.1 Apr 6, 2021
DJRickyB pushed a commit that referenced this issue Apr 27, 2021
As of version 8.0, Elasticsearch sets action.destructive_requires_name to true by default.

For Rally's purposes we set this value to false while executing delete-index operations so that we transparently support wildcard operations.

Closes #1152
danielmitterdorfer added a commit to danielmitterdorfer/rally that referenced this issue Mar 27, 2023
With this commit we make sure that index patterns are allowed when
deleting indices that are related to index templates (both legacy and
composable templates). Prior to this commit, an attempt to delete a
related index would fail with:

```
Wildcard expressions or all indices are not allowed
```

This is because Elasticsearch requires
`action.destructive_requires_name` to be set to `false` in order to
process delete requests with wildcards.

Relates elastic#1152
danielmitterdorfer added a commit that referenced this issue Mar 29, 2023
With this commit we make sure that index patterns are allowed when
deleting indices that are related to index templates (both legacy and
composable templates). Prior to this commit, an attempt to delete a
related index would fail with:

```
Wildcard expressions or all indices are not allowed
```

This is because Elasticsearch requires
`action.destructive_requires_name` to be set to `false` in order to
process delete requests with wildcards.

Relates #1152
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves the status quo :Load Driver Changes that affect the core of the load driver such as scheduling, the measurement approach etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants