mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
Add debug logging to retry logic for troubleshooting
This commit is contained in:
parent
8372ea824f
commit
0e8c3c66e9
1 changed files with 3 additions and 0 deletions
|
|
@ -172,8 +172,11 @@ module Vmpooler
|
||||||
retry_count = (redis.hget("vmpooler__odrequest__#{request_id}", 'retry_count') || '0').to_i
|
retry_count = (redis.hget("vmpooler__odrequest__#{request_id}", 'retry_count') || '0').to_i
|
||||||
max_retries = $config[:config]['max_vm_retries'] || 3
|
max_retries = $config[:config]['max_vm_retries'] || 3
|
||||||
|
|
||||||
|
$logger.log('s', "[!] [#{pool}] '#{vm}' checking retry logic: error='#{clone_error}', error_class='#{clone_error_class}', retry_count=#{retry_count}, max_retries=#{max_retries}")
|
||||||
|
|
||||||
# Determine if error is likely permanent (configuration issues)
|
# Determine if error is likely permanent (configuration issues)
|
||||||
permanent_error = permanent_error?(clone_error, clone_error_class)
|
permanent_error = permanent_error?(clone_error, clone_error_class)
|
||||||
|
$logger.log('s', "[!] [#{pool}] '#{vm}' permanent_error check result: #{permanent_error}")
|
||||||
|
|
||||||
if retry_count < max_retries && !permanent_error
|
if retry_count < max_retries && !permanent_error
|
||||||
# Increment retry count and retry VM creation
|
# Increment retry count and retry VM creation
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue