bosh_vsphere_cpi 1.5.0.pre.1504 → 1.5.0.pre.1525

Sign up to get free protection for your applications and to get access to all the features.
@@ -155,8 +155,11 @@ module VSphereCloud
155
155
  def power_on_vm(datacenter, vm)
156
156
  task = datacenter.power_on_vm([vm], nil)
157
157
  result = wait_for_task(task)
158
- if result.attempted.nil?
159
- raise "Could not power on VM: #{result.not_attempted.msg}"
158
+
159
+ raise "Recommendations were detected, you may be running in Manual DRS mode. Aborting." if result.recommendations.any?
160
+
161
+ if result.attempted.empty?
162
+ raise "Could not power on VM: #{result.not_attempted.map(&:msg).join(', ')}"
160
163
  else
161
164
  task = result.attempted.first.task
162
165
  wait_for_task(task)
@@ -88,6 +88,8 @@ module VSphereCloud
88
88
  cluster.datacenter.template_folder.mob)
89
89
  @logger.info('Waiting for NFC lease')
90
90
  state = wait_for_nfc_lease(lease)
91
+
92
+ raise_nfc_lease_error(lease) if state == Vim::HttpNfcLease::State::ERROR
91
93
  raise "Could not acquire HTTP NFC lease (state is: #{state})" unless state == Vim::HttpNfcLease::State::READY
92
94
 
93
95
  @logger.info('Uploading')
@@ -1140,5 +1142,12 @@ module VSphereCloud
1140
1142
 
1141
1143
  vms
1142
1144
  end
1145
+
1146
+ private
1147
+
1148
+ def raise_nfc_lease_error(lease)
1149
+ error_message = client.get_property(lease, Vim::HttpNfcLease, 'error').msg
1150
+ raise "Could not acquire HTTP NFC lease, message is: #{error_message}"
1151
+ end
1143
1152
  end
1144
1153
  end
@@ -1,7 +1,7 @@
1
1
  module Bosh
2
2
  module Clouds
3
3
  class VSphere
4
- VERSION = '1.5.0.pre.1504'
4
+ VERSION = '1.5.0.pre.1525'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh_vsphere_cpi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0.pre.1504
4
+ version: 1.5.0.pre.1525
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-07 00:00:00.000000000 Z
12
+ date: 2013-12-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bosh_common
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 1.5.0.pre.1504
21
+ version: 1.5.0.pre.1525
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: 1.5.0.pre.1504
29
+ version: 1.5.0.pre.1525
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: bosh_cpi
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - ~>
36
36
  - !ruby/object:Gem::Version
37
- version: 1.5.0.pre.1504
37
+ version: 1.5.0.pre.1525
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: 1.5.0.pre.1504
45
+ version: 1.5.0.pre.1525
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: membrane
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -109,7 +109,7 @@ dependencies:
109
109
  version: '0'
110
110
  description: ! 'BOSH VSphere CPI
111
111
 
112
- 882c2b'
112
+ df3988'
113
113
  email: support@cloudfoundry.com
114
114
  executables:
115
115
  - vsphere_cpi_console