Commit f56377a3 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Fix race locking issue in noded

Noded didn't release the job queue lock after initialising it. This
patch makes sure to unlock once the work is done.

Reviewed-by: ultrotter
parent 853e7f3d
......@@ -134,6 +134,11 @@ def InitAndVerifyQueue(must_lock):
# There must be a serious problem
raise errors.JobQueueError("Can't read/parse the job queue serial file")
if not must_lock:
# There's no need for more error handling. Closing the lock file below in
# case of an error will unlock it anyway.
queue_lock.Unlock()
except:
queue_lock.Close()
raise
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment