-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Closed
Labels
:Data Management/Ingest NodeExecution or management of Ingest Pipelines including GeoIPExecution or management of Ingest Pipelines including GeoIP>bug
Description
Elasticsearch version:
Version: 7.5.1, Build: default/tar/3ae9ac9a93c95bd0cdc054951cf95d88e1e18d96/2019-12-16T22:57:37.835892Z, JVM: 11.0.5
JVM version:
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.5+10, mixed mode)
OS version:
Linux 3.10.0-1062.1.2.el7.x86_64 #1 SMP Mon Sep 16 14:19:51 EDT 2019 x86_64 x86_64 x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
Deleting an unused enrich policy while action.destructive_requires_name: true
is in effect fails with the following exception:
{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "Wildcard expressions or all indices are not allowed"
}
],
"type" : "illegal_argument_exception",
"reason" : "Wildcard expressions or all indices are not allowed"
},
"status" : 400
}
After transiently setting action.destructive_requires_name: false
the deletion is successful:
{
"acknowledged" : true
}
Steps to reproduce:
- Create source index:
POST /gh-51228/_doc
{
"field": "value"
}
- Create enrich policy:
PUT /_enrich/policy/gh-51228
{
"match": {
"indices": [
"gh-51228"
],
"match_field": "field",
"enrich_fields": [
"field"
]
}
}
- Activate enrich policy:
PUT /_enrich/policy/gh-51228/_execute
- Disable wildcard deletes:
PUT /_cluster/settings
{
"transient" : {
"action" : {
"destructive_requires_name" : "true"
}
}
}
- Delete enrich policy:
DELETE /_enrich/policy/gh-51228
Metadata
Metadata
Assignees
Labels
:Data Management/Ingest NodeExecution or management of Ingest Pipelines including GeoIPExecution or management of Ingest Pipelines including GeoIP>bug
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
[-]Delete enrich policy fails with `action.destructive_requires_name[/-][+]Delete enrich policy fails with 'action.destructive_requires_name'[/+][-]Delete enrich policy fails with 'action.destructive_requires_name'[/-][+]Delete enrich policy fails when 'action.destructive_requires_name' is used[/+]elasticmachine commentedon Jan 20, 2020
Pinging @elastic/es-core-features (:Core/Features/Ingest)
martijnvg commentedon Jan 21, 2020
In the
TransportDeleteEnrichPolicyAction#deleteIndicesAndPolicy()
method, we should list all enrich index for the policy that gets deleted instead of sending a delete index request with a wildcard suffix. The method that invokesdeleteIndicesAndPolicy()
method has the cluster state, so from that we can figure out the enrich indices for the policy that is getting removed.Change the delete policy api to not pass wildcard expressions to the …
Change the delete policy api to not pass wildcard expressions to the …