From 50331e04785cbbca83b9fdcb6817439fd4a3660d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 18 Feb 2013 16:24:00 -0800 Subject: [PATCH] cleanup-run.sh: figure out owner Signed-off-by: Sage Weil --- cleanup-run.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cleanup-run.sh b/cleanup-run.sh index 21bfdedb13..50bc74d136 100755 --- a/cleanup-run.sh +++ b/cleanup-run.sh @@ -1,6 +1,7 @@ #!/bin/sh -ex -teuthology-lock --list-targets --owner $1 --desc-pattern /$2/ --status up > /tmp/$$ -teuthology-nuke --unlock -t /tmp/$$ -r --owner $1 +owner=`teuthology-lock -a --list --desc-pattern /$1/ --status up | grep locked_by | head -1 | awk '{print $2}' | sed 's/"//g' | sed 's/,//'` +teuthology-lock --list-targets --desc-pattern /$1/ --status up --owner $owner > /tmp/$$ +teuthology-nuke --unlock -t /tmp/$$ -r --owner $owner rm /tmp/$$ -- 2.39.5