]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph: lsof if umount fails
authorSage Weil <sage@redhat.com>
Sat, 21 Feb 2015 00:55:21 +0000 (16:55 -0800)
committerSage Weil <sage@redhat.com>
Tue, 24 Feb 2015 01:01:00 +0000 (17:01 -0800)
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 077e917af1394e5999293031afcc476b2bdce1e4)

tasks/ceph.py

index 589dcb1eb5f8cf9d32fe9decb66384c3ea198fe3..afc32140f32fa78bf5bab09ee2b7a96bb4a37d0b 100644 (file)
@@ -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')