elastic_manager 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/elastic_manager.gemspec +1 -1
- data/lib/elastic_manager/open.rb +9 -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: 79ec78560ed7b1857d5012b63be963a7ed37e8efa01a145baf90c40e566b0630
|
4
|
+
data.tar.gz: ffc4dd9850c466f9ab5d68903af80c4f76d4f08dd62273399de8f1f296d3c3ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b265ee6bb8a6b72ce5e8020914c1431b274da8bd3f7763e1ffe2c43d4a7327d5e297ec6f5910c770dd2c88b1f494c5320010b33eb5096ee3ca0cfd2f8b02bceb
|
7
|
+
data.tar.gz: 6f3948df1aa00c4946742d59e23d2cfe4ba795aa8f96601a991ab8d37b5e317da1ee71c28d157b1c277af08680b3881bca8790391faea5cb6297894a413dbf12
|
data/elastic_manager.gemspec
CHANGED
data/lib/elastic_manager/open.rb
CHANGED
@@ -35,6 +35,8 @@ module Open
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def do_open(indices)
|
38
|
+
results = []
|
39
|
+
|
38
40
|
indices.each do |index|
|
39
41
|
next if skip_index?(index, 'open')
|
40
42
|
|
@@ -43,14 +45,19 @@ module Open
|
|
43
45
|
if index_exist?(response)
|
44
46
|
next if already?(response, 'open')
|
45
47
|
|
46
|
-
elastic_action_with_log('open_index', index)
|
48
|
+
results << elastic_action_with_log('open_index', index)
|
47
49
|
else
|
48
50
|
log.warn "#{index} index not found"
|
49
51
|
log.info "#{index} trying snapshot restore"
|
50
52
|
|
51
|
-
elastic_action_with_log('restore_snapshot', index, @config['settings']['box_types']['store'])
|
53
|
+
results << elastic_action_with_log('restore_snapshot', index, @config['settings']['box_types']['store'])
|
52
54
|
end
|
53
55
|
end
|
56
|
+
|
57
|
+
exit 1 if results.all? { |e| e.is_a?(FalseClass) }
|
58
|
+
# It is little bit confusing, but we catch exit code 2 in jenkins
|
59
|
+
# for mark build as unstable instead of just fail it
|
60
|
+
exit 2 if results.any? { |e| e.is_a?(FalseClass) }
|
54
61
|
end
|
55
62
|
|
56
63
|
def open
|