clc-chef-metal-vsphere 0.3.20 → 0.3.21
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d16dbc6a25eb57abb89031a4454b2973333cb83e
|
4
|
+
data.tar.gz: 00eeaafca401e0718c7b37701652d3ed55159967
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a2b0e545aca1dc66b78b5d63fc0e8a5244a973f42bcd359cc7a016df2b210f08833767b1ea8800fbde7342f4b77bc03e783d7cbe5abceac94e8520ec91374a9
|
7
|
+
data.tar.gz: d5d2f123bfd12d4b9c5eeab7473a9add9bf2d41515e2c8eae5668ca0a3aa729803a44a15c3ed5a1909b9c7d75f82127eaf3c25b1cd00801811627dab18035ebe
|
@@ -205,16 +205,16 @@ module ChefMetalVsphere
|
|
205
205
|
end
|
206
206
|
|
207
207
|
if transport.nil? || !transport.available?
|
208
|
-
|
208
|
+
action_handler.report_progress "waiting for customizations to complete"
|
209
209
|
now = Time.now.utc
|
210
210
|
until (Time.now.utc - now) > 45 || (!vm.guest.ipAddress.nil? && vm.guest.ipAddress.length > 0) do
|
211
211
|
print "-"
|
212
212
|
sleep 5
|
213
213
|
end
|
214
214
|
if vm.guest.ipAddress.nil? || vm.guest.ipAddress.length == 0
|
215
|
-
|
215
|
+
action_handler.report_progress "rebooting..."
|
216
216
|
if vm.guest.toolsRunningStatus != "guestToolsRunning"
|
217
|
-
|
217
|
+
action_handler.report_progress "tools have stopped. current power state is #{vm.runtime.powerState} and tools state is #{vm.toolsRunningStatus}. powering up server..."
|
218
218
|
start_vm(vm)
|
219
219
|
else
|
220
220
|
restart_server(action_handler, machine_spec, vm)
|
@@ -225,6 +225,7 @@ module ChefMetalVsphere
|
|
225
225
|
sleep 5
|
226
226
|
end
|
227
227
|
end
|
228
|
+
action_handler.report_progress "IP address obtained: #{vm.guest.ipAddress}"
|
228
229
|
end
|
229
230
|
|
230
231
|
begin
|
@@ -434,13 +435,8 @@ module ChefMetalVsphere
|
|
434
435
|
end
|
435
436
|
|
436
437
|
def wait_for_transport(action_handler, machine_spec, machine_options, vm)
|
437
|
-
|
438
|
-
|
439
|
-
rescue Exception => e
|
440
|
-
Chef::Log.warn "Unable to obtain transport: #{e}"
|
441
|
-
end
|
442
|
-
|
443
|
-
if transport.nil? || !transport.available?
|
438
|
+
transport = transport_for(machine_spec, machine_options, vm)
|
439
|
+
if !transport.available?
|
444
440
|
if action_handler.should_perform_actions
|
445
441
|
action_handler.report_progress "waiting for #{machine_spec.name} (#{vm.config.instanceUuid} on #{driver_url}) to be connectable (transport up and running) ..."
|
446
442
|
|
@@ -469,7 +465,6 @@ module ChefMetalVsphere
|
|
469
465
|
bootstrap_options = bootstrap_options_for(machine_spec, machine_options)
|
470
466
|
ssh_options = bootstrap_options[:ssh]
|
471
467
|
remote_host = ip_for(bootstrap_options, vm)
|
472
|
-
return if remote_host.nil?
|
473
468
|
winrm_options = {:user => "#{remote_host}\\#{ssh_options[:user]}", :pass => ssh_options[:password], :disable_sspi => true}
|
474
469
|
|
475
470
|
ChefMetal::Transport::WinRM.new("http://#{remote_host}:5985/wsman", :plaintext, winrm_options, config)
|
@@ -481,7 +476,6 @@ module ChefMetalVsphere
|
|
481
476
|
ssh_options = bootstrap_options[:ssh]
|
482
477
|
ssh_user = ssh_options[:user]
|
483
478
|
remote_host = ip_for(bootstrap_options, vm)
|
484
|
-
return if remote_host.nil?
|
485
479
|
|
486
480
|
ChefMetal::Transport::SSH.new(remote_host, ssh_user, ssh_options, {}, config)
|
487
481
|
end
|
@@ -489,8 +483,8 @@ module ChefMetalVsphere
|
|
489
483
|
def ip_for(bootstrap_options, vm)
|
490
484
|
if has_static_ip(bootstrap_options)
|
491
485
|
bootstrap_options[:customization_spec][:ipsettings][:ip]
|
492
|
-
else
|
493
|
-
vm.guest.
|
486
|
+
else
|
487
|
+
vm.guest.ipAddress
|
494
488
|
end
|
495
489
|
end
|
496
490
|
end
|
@@ -39,6 +39,7 @@ describe "vsphere_driver" do
|
|
39
39
|
|
40
40
|
before :all do
|
41
41
|
@vm_name = "cmvd-test-#{SecureRandom.hex}"
|
42
|
+
#@vm_name = "cmvd-test-ee744c7bd5588f743c175dfc4100f172"
|
42
43
|
@metal_config = eval File.read(File.expand_path('../config.rb', __FILE__))
|
43
44
|
Cheffish.honor_local_mode do
|
44
45
|
chef_server = Cheffish.default_chef_server(@metal_config)
|