bosh_aws_cpi 1.2969.0 → 1.2972.0

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: dcde551d05372c1632aa0700f220bf35a2349a24
4
- data.tar.gz: e53bfe4f18026b2ca4050868d9d53e6cd6195c7d
3
+ metadata.gz: 8e06d17c1465acf4c2d05fe7b746b75e7835d683
4
+ data.tar.gz: 5ed9c3c800c500a7f07657b107de9629599d36ab
5
5
  SHA512:
6
- metadata.gz: dc59fc528e9049e0c21ed879ad32a206c5f43e0dcead227311292a4a15b114dc132b7354290a6698a4c4d15fc44795c375cc7177f5692568f94516a89fe147b4
7
- data.tar.gz: 5941409c18a8f643e1ce4e44fdd36fbad8e4108e7a15afc50e6320feffd9b21a445f42c66f146dbb694dbe11418953300c3430b4680783456bce90e77165e0da
6
+ metadata.gz: f660a88e715614d77a2e6e73385b0c5fddb662d913458690b7ea4892205519afd6eda7c92085d4111210d2da22d0b6eadac769e8e39305df6ae5b88567da6d53
7
+ data.tar.gz: e9ff55052f5ff610401a32c596acf6c6a63b2494e37e85c83513918eea4ee6840e21f8260654964193c9deb9e33a0f72422ab5f3879c031e6eeee68da1958d8a
@@ -245,7 +245,13 @@ module Bosh::AwsCloud
245
245
  errors = [AWS::EC2::Errors::VolumeInUse, AWS::EC2::Errors::RequestLimitExceeded]
246
246
 
247
247
  Bosh::Common.retryable(tries: tries, sleep: sleep_cb, on: errors, ensure: ensure_cb) do
248
- volume.delete
248
+ begin
249
+ volume.delete
250
+ rescue AWS::EC2::Errors::InvalidVolume::NotFound => e
251
+ logger.warn("Failed to delete disk '#{disk_id}' because it was not found: #{e.inspect}")
252
+ raise Bosh::Clouds::DiskNotFound, "Disk '#{disk_id}' not found"
253
+ end
254
+
249
255
  true # return true to only retry on Exceptions
250
256
  end
251
257
 
@@ -319,21 +325,23 @@ module Bosh::AwsCloud
319
325
  # @param [String] disk_id disk id of the disk to take the snapshot of
320
326
  # @return [String] snapshot id
321
327
  def snapshot_disk(disk_id, metadata)
328
+ metadata = Hash[metadata.map{|key,value| [key.to_s, value] }]
329
+
322
330
  with_thread_name("snapshot_disk(#{disk_id})") do
323
331
  volume = @ec2.volumes[disk_id]
324
332
  devices = []
325
333
  volume.attachments.each {|attachment| devices << attachment.device}
326
334
 
327
- name = [:deployment, :job, :index].collect { |key| metadata[key] }
335
+ name = ['deployment', 'job', 'index'].collect { |key| metadata[key] }
328
336
  name << devices.first.split('/').last unless devices.empty?
329
337
 
330
338
  snapshot = volume.create_snapshot(name.join('/'))
331
339
  logger.info("snapshot '#{snapshot.id}' of volume '#{disk_id}' created")
332
340
 
333
- [:agent_id, :instance_id, :director_name, :director_uuid].each do |key|
341
+ ['agent_id', 'instance_id', 'director_name', 'director_uuid'].each do |key|
334
342
  TagManager.tag(snapshot, key, metadata[key])
335
343
  end
336
- TagManager.tag(snapshot, :device, devices.first) unless devices.empty?
344
+ TagManager.tag(snapshot, 'device', devices.first) unless devices.empty?
337
345
  TagManager.tag(snapshot, 'Name', name.join('/'))
338
346
 
339
347
  ResourceWait.for_snapshot(snapshot: snapshot, state: :completed)
@@ -482,19 +490,21 @@ module Bosh::AwsCloud
482
490
  # @param [Hash] metadata metadata key/value pairs
483
491
  # @return [void]
484
492
  def set_vm_metadata(vm, metadata)
493
+ metadata = Hash[metadata.map{|key,value| [key.to_s, value] }]
494
+
485
495
  instance = @ec2.instances[vm]
486
496
 
487
497
  metadata.each_pair do |key, value|
488
498
  TagManager.tag(instance, key, value)
489
499
  end
490
500
 
491
- job = metadata[:job]
492
- index = metadata[:index]
501
+ job = metadata['job']
502
+ index = metadata['index']
493
503
 
494
504
  if job && index
495
505
  name = "#{job}/#{index}"
496
- elsif metadata[:compiling]
497
- name = "compiling/#{metadata[:compiling]}"
506
+ elsif metadata['compiling']
507
+ name = "compiling/#{metadata['compiling']}"
498
508
  end
499
509
  TagManager.tag(instance, "Name", name) if name
500
510
  rescue AWS::EC2::Errors::TagLimitExceeded => e
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module AwsCloud
3
- VERSION = '1.2969.0'
3
+ VERSION = '1.2972.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh_aws_cpi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2969.0
4
+ version: 1.2972.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - VMware
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-07 00:00:00.000000000 Z
11
+ date: 2015-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -30,42 +30,42 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.2969.0
33
+ version: 1.2972.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.2969.0
40
+ version: 1.2972.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bosh_cpi
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.2969.0
47
+ version: 1.2972.0
48
48
  type: :runtime
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: 1.2969.0
54
+ version: 1.2972.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bosh-registry
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.2969.0
61
+ version: 1.2972.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.2969.0
68
+ version: 1.2972.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: httpclient
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -138,7 +138,7 @@ dependencies:
138
138
  version: '0'
139
139
  description: |-
140
140
  BOSH AWS CPI
141
- a2411c
141
+ a6d1e9
142
142
  email: support@cloudfoundry.com
143
143
  executables:
144
144
  - aws_cpi