From 956600846897ed9716d2d627b2de0c22dec10ae1 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Wed, 10 Aug 2011 10:55:02 -0700 Subject: [PATCH] teuthology-nuke: use a more robust cfuse mount finder This way it can remove cfuse mounts in any location on the system. Signed-off-by: Greg Farnum --- teuthology/run.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/teuthology/run.py b/teuthology/run.py index a45264198d..3fb2138fe3 100644 --- a/teuthology/run.py +++ b/teuthology/run.py @@ -197,6 +197,14 @@ def nuke(): for remote in ctx.cluster.remotes.iterkeys(): proc = remote.run( args=[ + 'if', 'grep', '-q', 'cfuse', '/etc/mtab', run.Raw(';'), + 'then', + 'grep', 'cfuse', '/etc/mtab', run.Raw('|'), + 'grep', '-o', " /.* fuse", run.Raw('|'), + 'grep', '-o', "/.* ", run.Raw('|'), + 'xargs', 'sudo', 'fusermount', '-u', run.Raw(';'), + 'fi', + run.Raw(';'), 'killall', '--quiet', '/tmp/cephtest/binary/usr/local/bin/cmon', @@ -213,9 +221,6 @@ def nuke(): run.Raw(';'), 'fi', run.Raw(';'), - 'find', '/tmp/cephtest', '-maxdepth', '1', '-name', 'mnt.*', - '-execdir', 'fusermount', '-u', '{}', ';', - run.Raw(';'), ], wait=False, ) -- 2.39.5