From 2baa086e6aa52f38e3aafff7eca58bdca404786c Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Mon, 29 Jun 2015 15:54:08 +0200 Subject: [PATCH] list_locks must use 1 / 0 for True / False Depending on the backend being used (sqlite or another), paddles won't interpret locked=false as being the same as locked=0 (see http://tracker.ceph.com/issues/12183 for more context). Convert True to 1 and False to 0 to always get the same behavior from paddles, regardless of the backend. Signed-off-by: Loic Dachary --- teuthology/lock.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/teuthology/lock.py b/teuthology/lock.py index 5f68106400..eb0f202952 100644 --- a/teuthology/lock.py +++ b/teuthology/lock.py @@ -503,6 +503,11 @@ def unlock_one(ctx, name, user, description=None): def list_locks(keyed_by_name=False, **kwargs): uri = os.path.join(config.lock_server, 'nodes', '') + for key, value in kwargs.iteritems(): + if kwargs[key] is False: + kwargs[key] = '0' + if kwargs[key] is True: + kwargs[key] = '1' if kwargs: if 'machine_type' in kwargs: kwargs['machine_type'] = kwargs['machine_type'].replace(',','|') -- 2.39.5