shards 3.2 → 3.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40d1825ac3c373928a5d4a5df342e6c058fe305abd92686301bc7ea4549d1a74
|
4
|
+
data.tar.gz: e67a7dd5c45081123a4e866a852a3f65e4df6133eb23bf0693ef3e8f694dc945
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12b2b37ca0fe4e0e4644b613c185a606f5cbebea4d8eb8b40b62c0571b7c14ae7696ab6087d84e68f0cfe366bd1ac2819591738c9fa44fb1ad4ea65a34ee6cf4
|
7
|
+
data.tar.gz: cbc4e93e6f2398e3b3af6ecff3d80bb37cfc7d889ad4478385d28264e903abb421e843e14fc654201e20dca19a7dd5b83ea7831bf441d01480819678f72eb2ef
|
data/Gemfile.lock
CHANGED
@@ -51,6 +51,12 @@ shared_steps:
|
|
51
51
|
correct: application_reload_shards_task
|
52
52
|
wrong: loop_step
|
53
53
|
|
54
|
+
check_fingerprints2:
|
55
|
+
message: The yaml files have been updated correctly in server(s).
|
56
|
+
wrong_message: Fingerprints are not matching %s
|
57
|
+
correct: application_reload_shards_task
|
58
|
+
wrong: loop_step
|
59
|
+
|
54
60
|
application_reload_shards_task:
|
55
61
|
message: Reload task have been executed successfully.
|
56
62
|
wrong_message: Errors found in the reload task %s.
|
@@ -59,7 +65,7 @@ shared_steps:
|
|
59
65
|
|
60
66
|
puppet_agent_update:
|
61
67
|
message: Puppet has been executed successfully.
|
62
|
-
correct:
|
68
|
+
correct: check_fingerprints2
|
63
69
|
wrong_message: Errors executing the puppet update % s
|
64
70
|
wrong: loop_step
|
65
71
|
|
@@ -32,10 +32,11 @@ correct_steps_summary:
|
|
32
32
|
- validate_location
|
33
33
|
- validate_stage
|
34
34
|
# Run a 3 times loop when the above check fails.
|
35
|
-
-
|
35
|
+
- check_fingerprints
|
36
|
+
- loop_step # start the loop here when check_fingerprints fails
|
36
37
|
- puppet_agent_update
|
37
|
-
-
|
38
|
-
- application_reload_shards_task
|
38
|
+
- check_fingerprints2
|
39
|
+
- application_reload_shards_task # finish loop
|
39
40
|
- dns_upsert
|
40
41
|
|
41
42
|
start: validate_client
|
@@ -23,9 +23,10 @@ correct_steps_summary:
|
|
23
23
|
- validate_location
|
24
24
|
- validate_stage
|
25
25
|
# Run a 3 times loop when the above check fails.
|
26
|
-
-
|
26
|
+
- check_fingerprints
|
27
|
+
- loop_step # start the loop here if fingerprint fails
|
27
28
|
- puppet_agent_update
|
28
|
-
-
|
29
|
+
- check_fingerprints2 # finish loop
|
29
30
|
- application_reload_shards_task
|
30
31
|
|
31
32
|
start: validate_location
|
data/lib/shards/client.rb
CHANGED
@@ -215,7 +215,7 @@ module Shards
|
|
215
215
|
def puppet(location, stage)
|
216
216
|
|
217
217
|
s = get_stage location, stage
|
218
|
-
|
218
|
+
s.host_list=multitenant_filter s
|
219
219
|
puts s.check_remote_process remote_check: :puppet_agent!
|
220
220
|
|
221
221
|
end
|
@@ -226,6 +226,7 @@ module Shards
|
|
226
226
|
|
227
227
|
s = get_stage location, stage
|
228
228
|
|
229
|
+
s.host_list=multitenant_filter s
|
229
230
|
puts s.check_remote_process remote_check: :reload_shards!
|
230
231
|
|
231
232
|
end
|
@@ -254,6 +255,13 @@ module Shards
|
|
254
255
|
rows=rows.select { |x| x.join(' ').downcase.include?text.downcase } if text
|
255
256
|
rows
|
256
257
|
end
|
258
|
+
|
259
|
+
def multitenant_filter s
|
260
|
+
resp= s.check_remote_process remote_check: :fingerprints
|
261
|
+
resp.select! { |k,x| x.values.count { |v| v[:remote]=='md5sum:' } < 1 }
|
262
|
+
resp.keys
|
263
|
+
end
|
264
|
+
|
257
265
|
end
|
258
266
|
|
259
267
|
end
|
data/lib/shards/version.rb
CHANGED