ceph/cleanup-run.sh
Sage Weil 50331e0478 cleanup-run.sh: figure out owner
Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-18 16:24:00 -08:00

8 lines
310 B
Bash
Executable File

#!/bin/sh -ex
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/$$