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

Feature reset API should fail fast when action.destructive_requires_name is true #71178

Closed
benwtrent opened this issue Apr 1, 2021 · 3 comments · Fixed by #71240
Closed

Feature reset API should fail fast when action.destructive_requires_name is true #71178

benwtrent opened this issue Apr 1, 2021 · 3 comments · Fixed by #71240
Assignees
Labels
>bug :Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team

Comments

@benwtrent
Copy link
Member

Elasticsearch version (bin/elasticsearch --version):
master

Description of the problem including expected versus actual behavior:
Calling the feature reset API with action.destructive_requires_name: true results in the API
returning as if no failures occurred, but no reset actually took place
Steps to reproduce:

  1. Set action.destructive_requires_name to true
  2. Have some system indices (possibly .ml-* related ones)
  3. Call the reset feature API
  4. Notice no failure returned, but reset feature call failed to delete anything

I think to fix this, the API call should blow up when this setting is false to indicate failure.

@benwtrent benwtrent added >bug :Core/Infra/Core Core issues without another label labels Apr 1, 2021
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Apr 1, 2021
@elasticmachine
Copy link
Collaborator

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

@williamrandolph
Copy link
Contributor

My intention was for the reset to succeed no matter the value of that setting. I'll see if I can figure out what's going on.

@williamrandolph
Copy link
Contributor

After some investigation:

  1. I agree that the reset API should fail fast and will put out a PR to this effect.
  2. The specific failure has to do with not resolving associated index names before issuing the delete command. We resolve managed system indexes and delete them by name, and could do the same for associated indices, but I can file another issue to fix that problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants