Closed
Description
Describe the bug
It is not possible to delete an index template matching a data stream that is not used by the data stream.
To Reproduce
Steps to reproduce the behavior:
1.
PUT _index_template/test
{
"index_patterns": [
"test*"
],
"template": {},
"composed_of": [],
"priority": 50
}
PUT _index_template/test-data-stream
{
"index_patterns": [
"test"
],
"data_stream": {},
"template": {},
"composed_of": [],
"priority": 51
}
PUT _data_stream/test
DELETE _index_template/test
- Get following error:
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "unable to remove composable templates [test] as they are in use by a data streams [test]"
}
],
"type": "illegal_argument_exception",
"reason": "unable to remove composable templates [test] as they are in use by a data streams [test]"
},
"status": 400
}
Expected behavior
It should be possible to delete the index template as it is not used.
Plugins
opensearch-alerting
opensearch-anomaly-detection
opensearch-asynchronous-search
opensearch-cross-cluster-replication
opensearch-geospatial
opensearch-index-management
opensearch-job-scheduler
opensearch-knn
opensearch-ml
opensearch-neural-search
opensearch-notifications
opensearch-notifications-core
opensearch-observability
opensearch-reports-scheduler
opensearch-security
opensearch-security-analytics
opensearch-sql
prometheus-exporter
repository-s3
Host/Environment (please complete the following information):
- Setup: Docker on Ubuntu
- Opensearch: v2.8.0
Additional information:
elastic/elasticsearch#84376