Skip to content

Commit

Permalink
cleanup-run.sh: figure out owner
Browse files Browse the repository at this point in the history
Signed-off-by: Sage Weil <[email protected]>
  • Loading branch information
Sage Weil committed Feb 19, 2013
1 parent 2653b5a commit 50331e0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cleanup-run.sh
Original file line number Diff line number Diff line change
@@ -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/$$

0 comments on commit 50331e0

Please sign in to comment.