From: Sage Weil Date: Tue, 6 Mar 2012 17:34:38 +0000 (-0800) Subject: nuke: unmount osd data directories X-Git-Tag: 1.1.0~2609^2~7 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2a18c3e1d016dc20d566ca60830e49f76aad6750;p=teuthology.git nuke: unmount osd data directories This helps us avoid reboot to clean up osd data directories that are left mounted. --- diff --git a/teuthology/nuke.py b/teuthology/nuke.py index acefe280a3..bac300c4a3 100644 --- a/teuthology/nuke.py +++ b/teuthology/nuke.py @@ -130,6 +130,20 @@ def remove_kernel_mounts(ctx, kernel_mounts, log): for remote, proc in nodes: proc.exitstatus.get() +def remove_osd_mounts(ctx, log): + """ + unmount any osd data mounts (scratch disks) + """ + from .orchestra import run + ctx.cluster.run( + args=[ + 'grep', '/tmp/cephtest/data/', '/etc/mtab', run.Raw('|'), + 'awk', '{print $2}', run.Raw('|'), + 'xargs', 'sudo', 'umount', run.Raw(';'), + 'true' + ], + ) + def reboot(ctx, remotes, log): import time nodes = {} @@ -248,6 +262,9 @@ def nuke(ctx, log): shutdown_daemons(ctx, log) log.info('All daemons killed.') + log.info('Unmount any osd data directories...') + remove_osd_mounts(ctx, log) + log.info('Dealing with any kernel mounts...') kernel_mounts = find_kernel_mounts(ctx, log) #remove_kernel_mounts(ctx, kernel_mounts, log)