From 445c5ec4fbdf382f6479bec1b27d0a9364ba68b0 Mon Sep 17 00:00:00 2001 From: Petr Pudlak Date: Thu, 24 Apr 2014 11:55:22 +0200 Subject: [PATCH] Check for own locks when checking job death in Luxi Otherwise a job that is being started is falsely reported as dead. Signed-off-by: Petr Pudlak Reviewed-by: Klaus Aehlig --- src/Ganeti/JQScheduler.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Ganeti/JQScheduler.hs b/src/Ganeti/JQScheduler.hs index c13d60429..7adb620ed 100644 --- a/src/Ganeti/JQScheduler.hs +++ b/src/Ganeti/JQScheduler.hs @@ -321,7 +321,9 @@ checkForDeath state jobWS = do sjid = show $ fromJobId jid livelock = qjLivelock job logDebug $ "Livelock of job " ++ sjid ++ " is " ++ show livelock - died <- maybe (return False) isDead livelock + died <- maybe (return False) isDead + . mfilter (/= jqLivelock state) + $ livelock when died $ do logInfo $ "Detected death of job " ++ sjid -- if we manage to remove the job from the queue, we own the job file -- GitLab