From fd121c8ec0f99b4eb138ef7936a33e9a6b530d7a Mon Sep 17 00:00:00 2001 From: Michael Hanselmann Date: Thu, 14 Jul 2011 22:49:34 +0200 Subject: [PATCH] Fix assertion error on unclean master shutdown MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Commit 66bd7445 added an assertion to ensure a finalized job has its “end_timestamp” attribute set. Unfortunately it didn't cover a case when the queue is recovering from an unclean master shutdown. Signed-off-by: Michael Hanselmann Reviewed-by: Iustin Pop Reviewed-by: René Nussbaumer (cherry picked from commit 45df0793c6bc83001aa545fda95c1ad9a35d732f) --- lib/jqueue.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/jqueue.py b/lib/jqueue.py index 833e61c..5597f47 100644 --- a/lib/jqueue.py +++ b/lib/jqueue.py @@ -1289,6 +1289,7 @@ class JobQueue(object): else: job.MarkUnfinishedOps(constants.OP_STATUS_ERROR, "Unclean master daemon shutdown") + job.Finalize() self.UpdateJobUnlocked(job) -- 1.7.10.4