Skip to content

Commit fc550af

Browse files
vetin4riaxelaris
authored andcommitted
Added content type to curl requests which is now required as described in https://www.elastic.co/blog/strict-content-type-checking-for-elasticsearch-rest-requests (#137)
1 parent 4cc08cc commit fc550af

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

jobs/elasticsearch/templates/bin/drain.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set -e
66
# disable allocations before bringing down data nodes
77

88
curl -s -X PUT localhost:9200/_all/_settings \
9+
-H 'Content-Type: application/json' \
910
-d '{"settings": {"index.unassigned.node_left.delayed_timeout": "<%= p("elasticsearch.recovery.delay_allocation_restart") %>"}}' \
1011
> /dev/null
1112

jobs/elasticsearch/templates/bin/post-deploy.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ set -e
44

55
<% if p('elasticsearch.cloud.aws.bucket') != '' and p('elasticsearch.node.allow_master') and spec.bootstrap %>
66
curl -X PUT -s localhost:9200/_snapshot/<%= p('elasticsearch.snapshots.repository') %> \
7+
-H 'Content-Type: application/json' \
78
-d '{"type": "s3", "settings": {"bucket": "<%= p('elasticsearch.cloud.aws.bucket') %>"}}'
89
<% end %>
910

1011
<% if p('elasticsearch.path_repo') != '' and p('elasticsearch.node.allow_master') and spec.bootstrap %>
1112
curl -X PUT -s localhost:9200/_snapshot/<%= p('elasticsearch.snapshots.repository') %> \
13+
-H 'Content-Type: application/json' \
1214
-d '{"type": "fs", "settings": {"location": "<%= p('elasticsearch.path_repo') %>/<%= p('elasticsearch.snapshots.repository') %>", "compress": true}}'
1315
<% end %>

jobs/elasticsearch/templates/bin/post-start.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ rm ${out}
4848

4949
<% if p("elasticsearch.node.allow_data") %>
5050
curl -X PUT -s localhost:9200/_all/_settings \
51+
-H 'Content-Type: application/json' \
5152
-d '{"settings": {"index.unassigned.node_left.delayed_timeout": "<%= p("elasticsearch.recovery.delay_allocation") %>"}}'
5253
<% end %>
5354

0 commit comments

Comments
 (0)