Put Lifecycle method in ILM Client causes 400 Bad Request
See original GitHub issueThe PUT Lifecycle Endpoint send the name as a property in the body, which is not accepted by Elasticsearch. This causes a 400 Bad Request Response. Therefore this method is not usable.
Code
Application
client.ilm().putLifecycle(it -> {
it.name(policy.name())
it.policy(policy)
});
Request
Endpoint: PUT /_ilm/policy/{id}
{
"policy": {
"phases": {...},
"name": "{id}"
}
}
Response
Status: 400 Bad Request
{
"error": {
"root_cause": [
{
"type": "x_content_parse_exception",
"reason": "[1:94] [lifecycle_policy] unknown field [name]"
}
],
"type": "x_content_parse_exception",
"reason": "[1:101] [put_lifecycle_request] failed to parse field [policy]",
"caused_by": {
"type": "x_content_parse_exception",
"reason": "[1:94] [lifecycle_policy] unknown field [name]"
}
},
"status": 400
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Troubleshooting index lifecycle management errors - Elastic
When ILM executes a lifecycle policy, it's possible for errors to occur while performing the necessary index operations for a step. When this...
Read more >Error 400 navigating around IBM Engineering Lifecycle ...
Error 400 navigating around IBM Engineering Lifecycle Management applications due to cookies header exceeding a size limit.
Read more >ILM Store Troubleshooting - SAP Blogs
SLG1 Error: 400 Bad Request. Resolution: Implement SAP Note 2630651. Storage Media – File System. For using the file system as storage media, ......
Read more >elascticsearch roll over based on ilm policy with keeping ...
First, it looks like the application code is doing the "rollover" by itself since it's changing the index name everyday.
Read more >Why do I get a 400 Bad Request error when working ... - JFrog
Moreover, when using a Gradle client to resolve from a Maven repository, the request will always fail regardless of the version. Typically, only ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@oliverlockwood I’m working on a number of things both on the Java client and other projects, and prioritizing something will make some people happy but will obviously not be satisfying for others who don’t care much about it. I understand your concerns and I’m currently actively working on fixing the data structure related issues (coming from the API specification) since they’re more problematic that say missing features or a more extensive documentation, which are also highly requested. However data structure related issues also have to be prioritized according to the usage frequency of the affected APIs.
Now I heard you, and expect some news on these issues very soon. Thanks.
I also added a comment in #203 about the split package issue.
This has been fixed in PR #292, backported to version 8.2 in PR #293 and to version 7.17 in PR #294.