1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

B #2964: Fix bug and add rescue to control exceptions (#2996)

This commit is contained in:
Alejandro Huertas Herrero 2019-02-27 17:32:33 +01:00 committed by Tino Vázquez
parent bb3db27bec
commit 3297dd48fc
2 changed files with 7 additions and 1 deletions

View File

@ -149,6 +149,8 @@ module OneProvision
raise OneProvisionLoopException, errors
end
rescue StandardError
raise OneProvisionLoopException
end
# Retries ssh connection

View File

@ -115,13 +115,17 @@ module OneProvision
instance.run_mode[:fail_choice] = :cleanup
elsif options.key? :fail_retry
instance.run_mode[:fail_choice] = :retry
instance.run_mode[:max_retries] = options[:fail_retry].to_i
elsif options.key? :fail_skip
instance.run_mode[:fail_choice] = :skip
elsif options.key? :fail_quit
instance.run_mode[:fail_choice] = :quit
else
instance.run_mode[:fail_choice] = FAIL_CHOICE_DEFAULT
end
if options[:fail_retry]
instance.run_mode[:max_retries] = options[:fail_retry].to_i
else
instance.run_mode[:max_retries] = MAX_RETRIES_DEFAULT
end