zergrush_cf 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjJjOWI4MmYzZjUyODVlNjFiYjdmODBjZWI1YTBmZDhkODE2NmNlMQ==
4
+ NzI3YmEwNzUyYWJkNTVkMGM0Yjg0Zjc1NWQ3ODk1NWFmMWZlNGIxYw==
5
5
  data.tar.gz: !binary |-
6
- Zjg4NTEyNzhlZWNjN2FiNTNiMmY5NTRjNWUwYThjMTcyOGE3NTM1MA==
6
+ M2UwYWQyYzg0MGI1MGMzNjllY2I1ODM5NDlkZDlmYzU5NmFhYWI0Mg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MGY1M2VhMDAxNDEyNDczY2U1OGY1MTMwOTY3ZDA4Yzk5NjgwZjMyZjU1NmQ3
10
- YTVhZjNlOGQ3MjFhYmE0ZjIzOTAzMWI5MTI0ZDIwNTY3N2FlNGIwYmU3Y2Y2
11
- OGIwNmZhZGViMWE0OTAzODhlMzYwNjM3MWIzMGNkZjhjZDZiYzM=
9
+ M2I2YTFiYzgzNzg5MzE3M2NmM2E3MmMyNDU0NTY1ZjdlYjBlMGM2NzBmOWYx
10
+ OGQ2NWRkMTIxNWRmNjBhMzE0ZTg5NWU1ZWE5NTI0YTZiNTNhMzk5YTg4MGQ4
11
+ NWJiYjhlNWQyMmExYjFkN2MwMzE3OTE0MzRkZDJmNDBhNjZiNjY=
12
12
  data.tar.gz: !binary |-
13
- Njg5Y2ZmOGYzZmRjYjc4ZmEzZTdjYmNkNjI4NDJjM2UzMDBjNzBmZTIzZmUy
14
- NDNkMzMxMDM4MWM1ZjYyZjNkOTI4NzlmMTUwMjc4ZTYxYWM1ODI4Mzc4ZGM0
15
- ZDlhM2E1MjEwOGRmNTFlYmVmYWZhZThiYzVlNDNhYWFmNmUzNTI=
13
+ ZmRmOGQyMWIxZmQxYzE0OGY2ZGQzYzhhNWVlMTU1NTk0MGJmMzk2ZWEwMjU2
14
+ ZjAwMmYzYjBkOWI3ZjUxM2ZiY2ExODhhMmRiNjY5ODcxOWVlNDlmOGVkM2Jh
15
+ MDdhMWY1MWVkMTQ4YTA4MTg2NDczNzdkNWRlNDY3ZjYzMTNhNzc=
@@ -111,19 +111,24 @@ class CloudFormation < ZergGemPlugin::Plugin "/driver"
111
111
 
112
112
 
113
113
  # get the event collection and initial info
114
- outputs_info = cf.describe_stacks({ 'StackName' => stack_name })
115
- while outputs_info == nil do
116
- sleep 1
114
+ outputs_info = nil
115
+ with_retries(:max_tries => 10, :base_sleep_seconds => 3, :max_sleep_seconds => 20) {
117
116
  outputs_info = cf.describe_stacks({ 'StackName' => stack_name })
117
+ }
118
+ while outputs_info == nil do
119
+ sleep 3
120
+ with_retries(:max_tries => 10, :base_sleep_seconds => 3, :max_sleep_seconds => 20) {
121
+ outputs_info = cf.describe_stacks({ 'StackName' => stack_name })
122
+ }
118
123
  end
119
124
 
120
125
  events = nil
121
- with_retries(:max_tries => 10, :base_sleep_seconds => 3, :max_sleep_seconds => 20, :rescue => Fog::Errors::Error) {
126
+ with_retries(:max_tries => 10, :base_sleep_seconds => 3, :max_sleep_seconds => 20) {
122
127
  events = cf.describe_stack_events(stack_name).body['StackEvents']
123
128
  }
124
129
  while events == nil do
125
130
  sleep 3
126
- with_retries(:max_tries => 10, :base_sleep_seconds => 3, :max_sleep_seconds => 20, :rescue => Fog::Errors::Error) {
131
+ with_retries(:max_tries => 10, :base_sleep_seconds => 3, :max_sleep_seconds => 20) {
127
132
  events = cf.describe_stack_events(stack_name).body['StackEvents']
128
133
  }
129
134
  end
@@ -134,10 +139,10 @@ class CloudFormation < ZergGemPlugin::Plugin "/driver"
134
139
  logRabbitEvents(events.first(events.length - event_counter), rabbit_objects, eval_params(task_hash["vm"]["driver"]["driveroptions"][0]["rabbit"]))
135
140
  event_counter = events.length
136
141
 
137
- with_retries(:max_tries => 10, :base_sleep_seconds => 3, :max_sleep_seconds => 20, :rescue => Fog::Errors::Error) {
142
+ with_retries(:max_tries => 10, :base_sleep_seconds => 3, :max_sleep_seconds => 20) {
138
143
  events = cf.describe_stack_events(stack_name).body['StackEvents']
144
+ outputs_info = cf.describe_stacks({ 'StackName' => stack_name })
139
145
  }
140
- outputs_info = cf.describe_stacks({ 'StackName' => stack_name })
141
146
  if outputs_info.body["Stacks"][0]["StackStatus"] == "CREATE_COMPLETE"
142
147
  logEvents(events.first(events.length - event_counter))
143
148
  logRabbitEvents(events.first(events.length - event_counter), rabbit_objects, eval_params(task_hash["vm"]["driver"]["driveroptions"][0]["rabbit"]))
@@ -203,23 +208,25 @@ class CloudFormation < ZergGemPlugin::Plugin "/driver"
203
208
  # get the event collection and initial info
204
209
  outputs_info = nil
205
210
  while outputs_info == nil do
206
- sleep 1
207
- begin
208
- outputs_info = cf.describe_stacks({ 'StackName' => stack_name })
209
- rescue Fog::AWS::CloudFormation::NotFound
210
- rabbit_objects[:connection].close unless rabbit_objects == nil
211
- return 0
212
- end
211
+ sleep 3
212
+ outputs_info = cf.describe_stacks({ 'StackName' => stack_name })
213
+ begin
214
+ outputs_info = cf.describe_stacks({ 'StackName' => stack_name })
215
+ rescue Fog::AWS::CloudFormation::NotFound
216
+ rabbit_objects[:connection].close unless rabbit_objects == nil
217
+ return 0
218
+ end
219
+ }
213
220
  end
214
221
 
215
222
  events = nil
216
- with_retries(:max_tries => 10, :base_sleep_seconds => 3, :max_sleep_seconds => 20, :rescue => Fog::Errors::Error) {
223
+ with_retries(:max_tries => 10, :base_sleep_seconds => 3, :max_sleep_seconds => 20) {
217
224
  events = cf.describe_stack_events(stack_name).body['StackEvents']
218
225
  }
219
226
  while events == nil do
220
227
  sleep 3
221
228
  begin
222
- with_retries(:max_tries => 10, :base_sleep_seconds => 3, :max_sleep_seconds => 20, :rescue => Fog::Errors::Error) {
229
+ with_retries(:max_tries => 10, :base_sleep_seconds => 3, :max_sleep_seconds => 20) {
223
230
  events = cf.describe_stack_events(stack_name).body['StackEvents']
224
231
  }
225
232
  rescue Fog::AWS::CloudFormation::NotFound
@@ -234,17 +241,17 @@ class CloudFormation < ZergGemPlugin::Plugin "/driver"
234
241
  logRabbitEvents(events.first(events.length - event_counter), rabbit_objects, eval_params(task_hash["vm"]["driver"]["driveroptions"][0]["rabbit"]))
235
242
 
236
243
  event_counter = events.length
237
- begin
238
- with_retries(:max_tries => 10, :base_sleep_seconds => 3, :max_sleep_seconds => 20, :rescue => Fog::Errors::Error) {
244
+ with_retries(:max_tries => 10, :base_sleep_seconds => 3, :max_sleep_seconds => 20) {
245
+ begin
239
246
  events = cf.describe_stack_events(stack_name).body['StackEvents']
240
- }
241
- outputs_info = cf.describe_stacks({ 'StackName' => stack_name })
242
- rescue Fog::AWS::CloudFormation::NotFound
243
- logEvents(events.first(events.length - event_counter))
244
- logRabbitEvents(events.first(events.length - event_counter), rabbit_objects, eval_params(task_hash["vm"]["driver"]["driveroptions"][0]["rabbit"]))
245
- rabbit_objects[:connection].close unless rabbit_objects == nil
246
- return 0
247
- end
247
+ outputs_info = cf.describe_stacks({ 'StackName' => stack_name })
248
+ rescue Fog::AWS::CloudFormation::NotFound
249
+ logEvents(events.first(events.length - event_counter))
250
+ logRabbitEvents(events.first(events.length - event_counter), rabbit_objects, eval_params(task_hash["vm"]["driver"]["driveroptions"][0]["rabbit"]))
251
+ rabbit_objects[:connection].close unless rabbit_objects == nil
252
+ return 0
253
+ end
254
+ }
248
255
  end
249
256
 
250
257
  # log remaining events for error case
@@ -22,5 +22,5 @@
22
22
  #++
23
23
 
24
24
  module ZergrushCF
25
- VERSION = "0.0.11"
25
+ VERSION = "0.0.12"
26
26
  end
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
 
18
18
  s.add_development_dependency "bundler", ">= 1.0.0"
19
19
  s.add_development_dependency "rake"
20
- s.add_development_dependency "zergrush", ">= 0.0.18"
20
+ s.add_development_dependency "zergrush", ">= 0.0.19"
21
21
 
22
22
  s.add_dependency "fog", ">=1.20.0"
23
23
  s.add_dependency "bunny", ">=1.2.1"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zergrush_cf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - MTN Satellite Communications
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.0.18
47
+ version: 0.0.19
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
- version: 0.0.18
54
+ version: 0.0.19
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: fog
57
57
  requirement: !ruby/object:Gem::Requirement