From cef6e5d5e999642ffa99b1a8ba086ef113c0a3f8 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Thu, 7 Mar 2013 09:40:25 -0800 Subject: [PATCH] lock: remove description when unlocking This will hopefully make it easier to track down what's leaving nodes unlocked. Signed-off-by: Josh Durgin --- teuthology/lock.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/teuthology/lock.py b/teuthology/lock.py index d1148ab0718..3c092f6a7a4 100644 --- a/teuthology/lock.py +++ b/teuthology/lock.py @@ -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