From 48e80be73348f5207eefe432f2c8abc02a42366a Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Mon, 13 Jul 2015 10:56:29 -0600 Subject: [PATCH] Revert "Revert "lock.py: is_vpm should test is_vm"" This reverts commit 097e11c04a40e013e91a7a64836c98413af6a71a. I misidentified this as the commit which introduced a bug on Friday. Reintroduce the original, innocent commit. Signed-off-by: Zack Cerza --- teuthology/lock.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/teuthology/lock.py b/teuthology/lock.py index 1fc685e4f6..73bb648ed2 100644 --- a/teuthology/lock.py +++ b/teuthology/lock.py @@ -17,7 +17,9 @@ from .lockstatus import get_status log = logging.getLogger(__name__) -is_vpm = lambda name: 'vpm' in name + +def is_vm(name): + return get_status(name)['is_vm'] def get_distro_from_downburst(): @@ -314,7 +316,7 @@ def main(ctx): if ctx.owner is None and user is None: user = misc.get_user() # If none of them are vpm, do them all in one shot - if not filter(is_vpm, machines): + if not filter(is_vm, machines): res = unlock_many(machines, user) return 0 if res else 1 for machine in machines: -- 2.39.5