From cb4d3314f7c7c570a460fd717c63049d7b1c10f8 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Thu, 17 Nov 2011 12:08:32 +0100 Subject: [PATCH] masterd: Initialize job queue only after RPC client Otherwise jobs started after an unclean master shutdown will fail as they depend on the RPC client. Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- lib/server/masterd.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/server/masterd.py b/lib/server/masterd.py index 3985b635c..ed294adee 100644 --- a/lib/server/masterd.py +++ b/lib/server/masterd.py @@ -468,12 +468,12 @@ class GanetiContext(object): self.cfg.SetContext(self) - # Job queue - self.jobqueue = jqueue.JobQueue(self) - # RPC runner self.rpc = rpc.RpcRunner(self) + # Job queue + self.jobqueue = jqueue.JobQueue(self) + # setting this also locks the class against attribute modifications self.__class__._instance = self -- GitLab