From 63ce85ee66fc15f197eecf70097f7bd394d0f7af Mon Sep 17 00:00:00 2001 From: clime Date: Dec 07 2017 13:31:38 +0000 Subject: [backend] terminate also 'in_use' builders if health checks have failed --- diff --git a/backend/backend/vm_manage/event_handle.py b/backend/backend/vm_manage/event_handle.py index 9fa0ab9..1ac9b73 100644 --- a/backend/backend/vm_manage/event_handle.py +++ b/backend/backend/vm_manage/event_handle.py @@ -107,7 +107,7 @@ class EventHandler(Process): self.lua_scripts["record_failure"](keys=[vmd.vm_key]) fails_count = int(vmd.get_field(self.vmm.rc, "check_fails") or 0) max_check_fails = self.opts.build_groups[vmd.group]["vm_max_check_fails"] - if fails_count > max_check_fails and vmd.state != VmStates.IN_USE: + if fails_count > max_check_fails: self.log.info("check fail threshold reached: {}, terminating: {}" .format(check_fails_count, msg)) self.vmm.start_vm_termination(vmd.vm_name)