]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
teuthology-nuke: use a more robust cfuse mount finder
authorGreg Farnum <gregory.farnum@dreamhost.com>
Wed, 10 Aug 2011 17:55:02 +0000 (10:55 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Wed, 10 Aug 2011 21:37:41 +0000 (14:37 -0700)
This way it can remove cfuse mounts in any location on
the system.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
teuthology/run.py

index a45264198da16c25ddeafe44849f1fbfec529717..3fb2138fe3828c40acdbb5c828373d257e82d119 100644 (file)
@@ -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,
             )