mirror of
https://github.com/ceph/ceph
synced 2024-12-16 00:15:35 +00:00
lock: remove description when unlocking
This will hopefully make it easier to track down what's leaving nodes unlocked. Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
parent
4f68e3ee12
commit
cef6e5d5e9
@ -57,10 +57,13 @@ def lock(ctx, name, user=None):
|
||||
def unlock(ctx, name, user=None):
|
||||
if user is None:
|
||||
user = teuthology.get_user()
|
||||
desc_success = update_lock(ctx, name, description='')
|
||||
success, _ , _ = send_request('DELETE', _lock_url(ctx) + '/' + name + '?' + \
|
||||
urllib.urlencode(dict(user=user)))
|
||||
if success:
|
||||
log.debug('unlocked %s', name)
|
||||
if not desc_success:
|
||||
log.warn('failed to remove description for %s', name)
|
||||
else:
|
||||
log.error('failed to unlock %s', name)
|
||||
return success
|
||||
|
Loading…
Reference in New Issue
Block a user