From: Sage Weil Date: Sat, 21 Feb 2015 00:55:21 +0000 (-0800) Subject: ceph: lsof if umount fails X-Git-Tag: v0.94.10~27^2^2~167 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0365f8b68de5289a433c2e26253b12a988bc144c;p=ceph.git ceph: lsof if umount fails Signed-off-by: Sage Weil (cherry picked from commit 077e917af1394e5999293031afcc476b2bdce1e4) --- diff --git a/tasks/ceph.py b/tasks/ceph.py index 589dcb1eb5f8..afc32140f32f 100644 --- a/tasks/ceph.py +++ b/tasks/ceph.py @@ -761,16 +761,24 @@ def cluster(ctx, config): for remote, dirs in devs_to_clean.iteritems(): for dir_ in dirs: log.info('Unmounting %s on %s' % (dir_, remote)) - remote.run( - args=[ - 'sync', - run.Raw('&&'), - 'sudo', - 'umount', - '-f', - dir_ + try: + remote.run( + args=[ + 'sync', + run.Raw('&&'), + 'sudo', + 'umount', + '-f', + dir_ ] ) + except Exception as e: + remote.run(args=[ + 'sudo', + run.Raw('PATH=/usr/sbin:$PATH'), + 'lsof' + ]) + raise e if config.get('tmpfs_journal'): log.info('tmpfs journal enabled - unmounting tmpfs at /mnt')