vm_shepherd 1.7.1 → 1.7.2

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
  SHA1:
3
- metadata.gz: 99a0f22efce7d9dfcbc9d57fed83296f53ba78f4
4
- data.tar.gz: cddee95e088cfeb14da595da8ba90440124b540f
3
+ metadata.gz: d6846007d4981d1f09863a0c1efaa73667598060
4
+ data.tar.gz: 1e102d3be9b16a9d16ef28795a43b55bb3f2cf56
5
5
  SHA512:
6
- metadata.gz: a4bfb0896dc269d8a88cefd12372e9fa9aa463d47d34c5a0d56164151cb5471bbafe9cb2c0eb2e4d10edb00601fa7bb82865a78c0bad76686696e9ce2ba9a9e0
7
- data.tar.gz: b56fdd0f724900ebe79af8261c40988141b3355137105143937533c410ac8d0ab9756c70393beff9a0684a1c90ff08e1b48a45988265e4541f1fbb0d39736e5b
6
+ metadata.gz: 3b03d22cf4c7099442b0130c3ab36c50e2b5443bd00f0dd00f600a5e1f821c782ad69405d87d6aa4fc213776f192622636234174513555c6af79bcab329335eb
7
+ data.tar.gz: 19ba79193fcfad0c6c41d3dd3b9d80555f11254ce817d5084e4c3b41b1a26f9800f44f41a2dfd786160b7717f5cc6abd18eb6822ee13b3643f7a80e46ae9b7d4
@@ -34,7 +34,7 @@ module VmShepherd
34
34
  stack = cfm.stacks.create(env_config.fetch(:stack_name), template, parameters: env_config.fetch(:parameters), capabilities: ['CAPABILITY_IAM'])
35
35
 
36
36
  logger.info("Waiting for status: #{CREATE_COMPLETE}")
37
- retry_until(retry_limit: 360) do
37
+ retry_until(retry_limit: 30) do
38
38
  status = stack.status
39
39
  logger.info("current stack status: #{status}")
40
40
  case status
@@ -227,7 +227,7 @@ module VmShepherd
227
227
  logger.info('deleting CloudFormation stack')
228
228
  stack.delete
229
229
  logger.info("waiting until status: #{DELETE_COMPLETE}")
230
- retry_until(retry_limit: 360) do
230
+ retry_until(retry_limit: 30) do
231
231
  begin
232
232
  status = stack.status
233
233
  logger.info("current stack status: #{status}")
@@ -3,8 +3,8 @@ module VmShepherd
3
3
  class RetryLimitExceeded < StandardError
4
4
  end
5
5
 
6
- RETRY_LIMIT = 60
7
- RETRY_INTERVAL = 10
6
+ RETRY_LIMIT = 10
7
+ RETRY_INTERVAL = 60
8
8
 
9
9
  def retry_until(retry_limit: RETRY_LIMIT, &block)
10
10
  tries = 0
@@ -1,3 +1,3 @@
1
1
  module VmShepherd
2
- VERSION = '1.7.1'.freeze
2
+ VERSION = '1.7.2'.freeze
3
3
  end
@@ -91,7 +91,7 @@ module VmShepherd
91
91
 
92
92
  it 'stops retrying after 360 times' do
93
93
  expect(stack).to receive(:status).and_return('CREATE_IN_PROGRESS').
94
- exactly(360).times
94
+ exactly(30).times
95
95
 
96
96
  expect { ami_manager.prepare_environment(cloudformation_template_file.path) }.to raise_error(AwsManager::RetryLimitExceeded)
97
97
  end
@@ -367,7 +367,7 @@ module VmShepherd
367
367
 
368
368
  it 'stops retrying after 360 times' do
369
369
  expect(stack).to receive(:status).and_return('DELETE_IN_PROGRESS').
370
- exactly(360).times
370
+ exactly(30).times
371
371
 
372
372
  expect { ami_manager.clean_environment }.to raise_error(AwsManager::RetryLimitExceeded)
373
373
  end
@@ -467,7 +467,7 @@ module VmShepherd
467
467
 
468
468
  it 'waits for the elb to be deleted' do
469
469
  expect(load_balancer_to_delete).to receive(:exists?).and_return(true).
470
- exactly(60).times
470
+ exactly(10).times
471
471
 
472
472
  expect(elb_security_group).not_to receive(:delete).ordered
473
473
  expect { ami_manager.clean_environment }.to raise_error(AwsManager::RetryLimitExceeded)
@@ -477,10 +477,10 @@ module VmShepherd
477
477
  allow(load_balancer_to_delete).to receive(:exists?).and_return(false)
478
478
 
479
479
  expect(network_interface_1).to receive(:exists?).and_return(false).
480
- exactly(60).times
480
+ exactly(10).times
481
481
 
482
482
  expect(network_interface_2).to receive(:exists?).and_return(true).
483
- exactly(60).times
483
+ exactly(10).times
484
484
 
485
485
  expect(elb_security_group).not_to receive(:delete).ordered
486
486
  expect { ami_manager.clean_environment }.to raise_error(AwsManager::RetryLimitExceeded)
@@ -12,8 +12,8 @@ module VmShepherd
12
12
  allow(retry_helper).to receive(:sleep) # speed up retry logic
13
13
  end
14
14
 
15
- it 'calls the given block 60 times by default' do
16
- sixty_times = [true] + [false] * 59
15
+ it 'calls the given block 10 times by default' do
16
+ sixty_times = [true] + [false] * 9
17
17
  expect {
18
18
  retry_helper.retry_until { sixty_times.pop }
19
19
  }.not_to raise_error
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vm_shepherd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ops Manager Team