vm_shepherd 1.9.0 → 1.9.1

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
  SHA1:
3
- metadata.gz: 9005c41f3252dada8327d25150585f18eab17a14
4
- data.tar.gz: c1b4637cbe43854e4a1a3e1569beffa64c333adf
3
+ metadata.gz: b7e502bced271f1b5046793bd8965232d23291a5
4
+ data.tar.gz: 8cfa8bde123a2bf7a238e3f5cab9e05abc0bfbf2
5
5
  SHA512:
6
- metadata.gz: 3545eaa72f1f99a5896eb1a2660ea995bc08ffe810a45f5368111e05ef9500eb222326d1000b6257d2bfdeda899bfa63b6f3ef4b67ca470dc30e3515a9def169
7
- data.tar.gz: bf1964936e38d28329afa32d70c83e506f129ec8b879bd65fdd0367790c536af3113213c2a54b5e609b31c541bc35aec8faef79984b4dc4b003847395f5e3f80
6
+ metadata.gz: e2913b86106d6e4b57656a729291eb590dae6f9ac10bc99a9b8e5cb60a61e197515dae763f8c5957093847c01ea95a30b8154f1eff0ecb6fc2b10f7419c3da6b
7
+ data.tar.gz: 841d05a234ac68d9cb6147d29afa9f89cbf43e43d0f2ee106e7b66815907a42d6baf7298920b5fbb8befc628bd0fd9dd44e824065ec619835a39213c72e68c9e
@@ -174,7 +174,13 @@ module VmShepherd
174
174
  def delete_elb(elb_name)
175
175
  if (elb = AWS::ELB.new.load_balancers.find { |lb| lb.name == elb_name })
176
176
  sg = elb.security_groups.first
177
- net_interfaces = AWS.ec2.network_interfaces.select { |ni| ni.security_groups.map(&:id).include? sg.id }
177
+ net_interfaces = AWS.ec2.network_interfaces.select do |ni|
178
+ begin
179
+ ni.security_groups.map(&:id).include? sg.id
180
+ rescue AWS::EC2::Errors::InvalidNetworkInterfaceID::NotFound
181
+ false
182
+ end
183
+ end
178
184
  logger.info("deleting elb: #{elb.name}")
179
185
  elb.delete
180
186
  logger.info('waiting until elb is deleted')
@@ -1,3 +1,3 @@
1
1
  module VmShepherd
2
- VERSION = '1.9.0'.freeze
2
+ VERSION = '1.9.1'.freeze
3
3
  end
@@ -528,6 +528,18 @@ module VmShepherd
528
528
  expect { ami_manager.clean_environment }.to raise_error(AwsManager::RetryLimitExceeded)
529
529
  end
530
530
 
531
+ it 'does not care about network interfaces deleted by other processes' do
532
+ allow(network_interface_1_elb_1).to receive(:security_groups).and_raise(AWS::EC2::Errors::InvalidNetworkInterfaceID::NotFound)
533
+
534
+ expect(load_balancer_1_to_delete).to receive(:delete).ordered
535
+ expect(elb_1_security_group).to receive(:delete).ordered
536
+
537
+ expect(load_balancer_2_to_delete).to receive(:delete).ordered
538
+ expect(elb_2_security_group).to receive(:delete).ordered
539
+
540
+ ami_manager.clean_environment
541
+ end
542
+
531
543
  it 'terminates the ELBs then removes the security group' do
532
544
  expect(load_balancer_1_to_delete).to receive(:delete).ordered
533
545
  expect(elb_1_security_group).to receive(:delete).ordered
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vm_shepherd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ops Manager Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-30 00:00:00.000000000 Z
11
+ date: 2015-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-v1