1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-11 05:17:41 +03:00

B #2262 make the code more robust

(cherry picked from commit faf3b763a8)
This commit is contained in:
joseangelgm 2018-07-23 17:58:14 +02:00 committed by Tino Vazquez
parent 2945fc1a20
commit 5ebb05affd
2 changed files with 7 additions and 2 deletions

View File

@ -47,8 +47,12 @@ class VIClient
end
def load_vcenter_configuration
vcenter_conf = YAML::load(File.open("#{ETC_LOCATION}/vcenter_driver.conf"))
vcenter_conf
begin
vcenter_conf = YAML::load(File.open("#{ETC_LOCATION}/vcenter_driver.conf"))
vcenter_conf
rescue
Hash.new
end
end
def get_property_vcenter_conf(key)

View File

@ -1488,6 +1488,7 @@ class VirtualMachine < Template
# process that uses this method
def wait_deploy_timeout
timeout_deploy = @vi_client.get_property_vcenter_conf(:vm_poweron_wait_default)
timeout_deploy = 300 if timeout_deploy.nil?
time_start = Time.now
begin
time_running = Time.now - time_start