-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Open
Labels
:Data Management/Indices APIsAPIs to create and manage indices and templatesAPIs to create and manage indices and templates>bugTeam:Data ManagementMeta label for data/management teamMeta label for data/management team
Description
Elasticsearch Version
8.16.1
Installed Plugins
none
Java Version
bundled
OS Version
Kubernetes 1.30.4 on Ubuntu 22.04
Problem Description
Elasticsearch returns HTTP/400 when creating an index template via API call where one of the associated component templates is a file-based component template
This, for example, prevents integration from upgrading when it ships with an updated index templates.
E.g:
(I'm sorry I can't copy-paste the error as the message is not persistent when I try to move my mouse to select it.)
Additional context in these Slack threads:
- https://elastic.slack.com/archives/CJZ9U5G9X/p1732801746634399
- https://elastic.slack.com/archives/C0D8ST60Y/p1680259171010499
Steps to Reproduce
- Create and apply
test@custom
component template via ECK stackconfigpolicy
apiVersion: stackconfigpolicy.k8s.elastic.co/v1alpha1
kind: StackConfigPolicy
metadata:
name: elasticsearch
spec:
elasticsearch:
indexTemplates:
componentTemplates:
test@custom:
template:
settings:
refresh_interval: "10s"
- Wait for the stackconfigpolicy to be in ready phase (change propagated)
$ k get stackconfigpolicies.stackconfigpolicy.k8s.elastic.co elasticsearch
NAME READY PHASE AGE
elasticsearch 2/2 Ready 1d
- Go to Kibana developer tools and create a
test
index template this way
PUT _index_template/test
{
"index_patterns": ["test*"],
"template": {
"settings": {},
"mappings": {}
},
"priority": 200,
"composed_of": ["test@custom","test2@custom"],
"ignore_missing_component_templates": ["test@custom","test2@custom"]
}
- See the error returned
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": """Failed to process request [PutTemplateV2Request[name=test, cause=api, create=false, index_template={"index_patterns":["test*"],"template":{"settings":{}},"composed_of":["test@custom","test2@custom"],"priority":200,"ignore_missing_component_templates":["test@custom","test2@custom"]}]] with errors: [[component_template:test@custom] is reserved by [file_settings]]"""
}
],
"type": "illegal_argument_exception",
"reason": """Failed to process request [PutTemplateV2Request[name=test, cause=api, create=false, index_template={"index_patterns":["test*"],"template":{"settings":{}},"composed_of":["test@custom","test2@custom"],"priority":200,"ignore_missing_component_templates":["test@custom","test2@custom"]}]] with errors: [[component_template:test@custom] is reserved by [file_settings]]"""
},
"status": 400
}
Logs (if relevant)
No response
jmbass and JohnLyman
Metadata
Metadata
Assignees
Labels
:Data Management/Indices APIsAPIs to create and manage indices and templatesAPIs to create and manage indices and templates>bugTeam:Data ManagementMeta label for data/management teamMeta label for data/management team