From 8beab7f874a6a7857c2f2260a52cf881684b97c2 Mon Sep 17 00:00:00 2001 From: isaac-hammes Date: Wed, 23 Aug 2023 08:41:07 -0700 Subject: [PATCH] (maint) Fix bug where fail_pending_vm was logging an error before any timeouts are reached. --- lib/vmpooler/pool_manager.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/vmpooler/pool_manager.rb b/lib/vmpooler/pool_manager.rb index 82ed6a5..128ad60 100644 --- a/lib/vmpooler/pool_manager.rb +++ b/lib/vmpooler/pool_manager.rb @@ -129,6 +129,8 @@ module Vmpooler already_timed_out = time_since_clone > timeout timing_out_soon = time_since_clone > timeout_notification && !redis.hget("vmpooler__vm__#{vm}", 'timeout_notification') + return true if !already_timed_out && !timing_out_soon + if already_timed_out unless exists remove_nonexistent_vm(vm, pool, redis)