mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-27 10:28:41 -05:00
Remove unnecessary rescue
This commit removes an unnecessary rescue that results in duplicate clone error messages. Without this change clone failures due to unavailable host resources are logged twice. A log message is added to specify the host the VM is running on when migration_limit is not set and migration is disabled. Lastly, when a migration fails it reports the host the VM is running on in addition to the reason for the failed migration.
This commit is contained in:
parent
82b9033e83
commit
048ab4433a
2 changed files with 26 additions and 23 deletions
|
|
@ -224,10 +224,9 @@ module Vmpooler
|
|||
$logger.log('s', "[+] [#{pool_name}] '#{new_vmname}' cloned in #{finish} seconds")
|
||||
|
||||
$metrics.timing("clone.#{pool_name}", finish)
|
||||
rescue => err
|
||||
$logger.log('s', "[!] [#{pool_name}] '#{new_vmname}' clone failed with an error: #{err}")
|
||||
rescue => _err
|
||||
$redis.srem('vmpooler__pending__' + pool_name, new_vmname)
|
||||
raise
|
||||
raise _err
|
||||
ensure
|
||||
$redis.decr('vmpooler__tasks__clone')
|
||||
end
|
||||
|
|
@ -712,9 +711,6 @@ module Vmpooler
|
|||
end
|
||||
|
||||
pool_check_response
|
||||
rescue => err
|
||||
$logger.log('d', "[!] [#{pool['name']}] _check_pool failed with an error: #{err}")
|
||||
raise
|
||||
end
|
||||
|
||||
# Create a provider object, usually based on the providers/*.rb class, that implements providers/base.rb
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue