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

locking: Clarify message for removed locks



Just being told that a lock doesn't exist can be confusing. One case
were this happens is when a job (e.g. instance modify) waits for a job
removing the instance (e.g. export with remove).
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 29e8788e
......@@ -1101,8 +1101,8 @@ class LockSet:
# element is not there anymore.
continue
raise errors.LockError("Non-existing lock %s in set %s" %
(lname, self.name))
raise errors.LockError("Non-existing lock %s in set %s (it may have"
" been removed)" % (lname, self.name))
acquire_list.append((lname, lock))
......@@ -1134,8 +1134,8 @@ class LockSet:
# particular element is not there anymore.
continue
raise errors.LockError("Non-existing lock %s in set %s" %
(lname, self.name))
raise errors.LockError("Non-existing lock %s in set %s (it may"
" have been removed)" % (lname, self.name))
if not acq_success:
# Couldn't get lock or timeout occurred
......
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