Commit 506cff12 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Use lock timeout for queue updates in ganeti-noded

This helps to prevent complete deadlocks.

Reviewed-by: iustinp
parent 86de84dd
......@@ -54,9 +54,8 @@ def _RequireJobQueueLock(fn):
def wrapper(*args, **kwargs):
# Locking in exclusive, blocking mode because there could be several
# children running at the same time.
# TODO: Implement nonblocking locking with retries?
# children running at the same time. Waiting up to 10 seconds.
queue_lock.Exclusive(blocking=True, timeout=10)
return fn(*args, **kwargs)
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