Fixed robo issues

This commit is contained in:
Mahima Singh 2025-12-04 16:12:23 +05:30
parent f290c6806e
commit 9e75854ec4

View file

@ -173,7 +173,7 @@ module Vmpooler
max_retries = $config[:config]['max_vm_retries'] || 3 max_retries = $config[:config]['max_vm_retries'] || 3
# Determine if error is likely permanent (configuration issues) # Determine if error is likely permanent (configuration issues)
permanent_error = is_permanent_error?(clone_error, clone_error_class) permanent_error = permanent_error?(clone_error, clone_error_class)
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
@ -199,7 +199,7 @@ module Vmpooler
end end
# Determine if an error is likely permanent (configuration issue) vs transient # Determine if an error is likely permanent (configuration issue) vs transient
def is_permanent_error?(error_message, error_class) def permanent_error?(error_message, error_class)
return false if error_message.nil? || error_class.nil? return false if error_message.nil? || error_class.nil?
permanent_error_patterns = [ permanent_error_patterns = [
@ -223,8 +223,8 @@ module Vmpooler
# Check error message patterns # Check error message patterns
permanent_error_patterns.any? { |pattern| error_message.match?(pattern) } || permanent_error_patterns.any? { |pattern| error_message.match?(pattern) } ||
# Check error class types # Check error class types
permanent_error_classes.include?(error_class) permanent_error_classes.include?(error_class)
end end
def move_pending_vm_to_ready(vm, pool, redis, request_id = nil) def move_pending_vm_to_ready(vm, pool, redis, request_id = nil)