mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
(POOLER-156) Detect redis connection failures
This commit adds detection for redis connection failures to pool_manager. When a connection fails the error will be raised to executeforcing the connection to be re-established. Without this change, when a redis connection fails, it generates a redis connection error, which is swallowed by a rescue for StandardError, preventing the manager application component from recovering in the case of a redis connection failure.
This commit is contained in:
parent
d653ce482e
commit
283dea62a7
2 changed files with 27 additions and 0 deletions
|
|
@ -822,6 +822,8 @@ module Vmpooler
|
|||
loop_count += 1
|
||||
end
|
||||
end
|
||||
rescue Redis::CannotConnectError => e
|
||||
raise
|
||||
rescue StandardError => e
|
||||
$logger.log('s', "[!] [#{pool['name']}] Error while checking the pool: #{e}")
|
||||
raise
|
||||
|
|
@ -1310,6 +1312,9 @@ module Vmpooler
|
|||
loop_count += 1
|
||||
end
|
||||
end
|
||||
rescue Redis::CannotConnectError => e
|
||||
$logger.log('s', "Cannot connect to the redis server: #{e}")
|
||||
raise
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue