elastic_manager 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/elastic_manager.gemspec +1 -1
- data/lib/elastic_manager/request.rb +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e928c0ce49a3b4d9afd1bc6aabb4eadd6aeee5820488454f603292c33aa34e4a
|
|
4
|
+
data.tar.gz: 5edb38e1697dde5693ec7d82d8cf1b05d213e43b0100008ab705baf6d0bf108e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4223191db7bd7ae0e0c06c20c67927a97289f4618ac4a8ba2e2c2afe8e9a334a2bd99552259f70e36c3e600142c9255cf0d8ef4a72aa6bb419a86be1d83d215a
|
|
7
|
+
data.tar.gz: 40233f8a8a54b785459d627724637431861bd07d09a0dd34c00da38d2dc7a4e174e39ea83059cda6550e5a9d753dc0ded1b7126a184afca1b428a9a7bbb9394a
|
data/README.md
CHANGED
data/elastic_manager.gemspec
CHANGED
|
@@ -350,6 +350,7 @@ module Request
|
|
|
350
350
|
if state == 'SUCCESS'
|
|
351
351
|
snapshot_ok = true
|
|
352
352
|
elsif %w[FAILED PARTIAL INCOMPATIBLE].include?(state)
|
|
353
|
+
# TODO: (anton.ryabov) add slack notify due failed snapshot
|
|
353
354
|
log.fatal "can't snapshot #{snapshot} in #{repo}: #{response.code} - #{response}"
|
|
354
355
|
exit 1
|
|
355
356
|
end
|
|
@@ -366,18 +367,19 @@ module Request
|
|
|
366
367
|
snapshot_repo = find_snapshot_repo
|
|
367
368
|
|
|
368
369
|
body = {
|
|
369
|
-
'indices' => index,
|
|
370
|
+
'indices' => CGI.unescape(index),
|
|
370
371
|
'ignore_unavailable' => false,
|
|
371
372
|
'include_global_state' => false,
|
|
372
373
|
'partial' => false
|
|
373
374
|
}
|
|
374
375
|
|
|
375
|
-
response = request(:put, "/_snapshot/#{snapshot_repo}/#{
|
|
376
|
+
response = request(:put, "/_snapshot/#{snapshot_repo}/#{index}/", body)
|
|
376
377
|
|
|
377
378
|
if response.code == 200
|
|
378
379
|
sleep 5
|
|
379
380
|
wait_snapshot(snapshot_name, snapshot_repo)
|
|
380
381
|
else
|
|
382
|
+
# TODO: (anton.ryabov) add slack notify due failed snapshot
|
|
381
383
|
log.error "can't snapshot #{index}, response was: #{response.code} - #{response}"
|
|
382
384
|
false
|
|
383
385
|
end
|