shards 3.2 → 3.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6f3e5c3b27a1260b50f1a00cf86ae62e8b7c1593fc2feb1e68bd7cd7194d438
4
- data.tar.gz: 6ba8aaf2b3d0025d8750d552ea50d9061f2bae402f951770813f0dbaef8285ee
3
+ metadata.gz: 40d1825ac3c373928a5d4a5df342e6c058fe305abd92686301bc7ea4549d1a74
4
+ data.tar.gz: e67a7dd5c45081123a4e866a852a3f65e4df6133eb23bf0693ef3e8f694dc945
5
5
  SHA512:
6
- metadata.gz: 8064c86c8daab178f602e47052b2d56977c744214b169524e3b8cf5d16c704456dd1e1657030b6dc040ff72b1f646877155d8ceabfedf7182c7fcef64e0abd66
7
- data.tar.gz: d4a076e06a2af9e83d8efc2bc01c2234d46062fca82e41c97420cdbd4c354d67aa305109498e09b2bdb77415162038f8270aaf570258e8b8dbae34b2cde1a31f
6
+ metadata.gz: 12b2b37ca0fe4e0e4644b613c185a606f5cbebea4d8eb8b40b62c0571b7c14ae7696ab6087d84e68f0cfe366bd1ac2819591738c9fa44fb1ad4ea65a34ee6cf4
7
+ data.tar.gz: cbc4e93e6f2398e3b3af6ecff3d80bb37cfc7d889ad4478385d28264e903abb421e843e14fc654201e20dca19a7dd5b83ea7831bf441d01480819678f72eb2ef
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shards (3.2)
4
+ shards (3.3)
5
5
  aws-sdk-ec2 (~> 1.48)
6
6
  aws-sdk-elasticloadbalancing (~> 1.5)
7
7
  aws-sdk-elasticloadbalancingv2 (~> 1.14)
@@ -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: check_fingerprints
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
- - loop_step # start the loop here
35
+ - check_fingerprints
36
+ - loop_step # start the loop here when check_fingerprints fails
36
37
  - puppet_agent_update
37
- - check_fingerprints # finish loop
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
- - loop_step # start the loop here
26
+ - check_fingerprints
27
+ - loop_step # start the loop here if fingerprint fails
27
28
  - puppet_agent_update
28
- - check_fingerprints # finish loop
29
+ - check_fingerprints2 # finish loop
29
30
  - application_reload_shards_task
30
31
 
31
32
  start: validate_location
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Shards
2
- VERSION = "3.2"
2
+ VERSION = "3.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shards
3
3
  version: !ruby/object:Gem::Version
4
- version: '3.2'
4
+ version: '3.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diego PL