From b49d6d8ead7fcc254f2995e4eb035b379123851b Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Wed, 19 Jul 2017 15:32:37 +0800 Subject: [PATCH] qa/cephfs: lsof if umount fails Signed-off-by: "Yan, Zheng" --- qa/tasks/cephfs/fuse_mount.py | 9 +++++++++ qa/tasks/cephfs/kernel_mount.py | 12 +++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/qa/tasks/cephfs/fuse_mount.py b/qa/tasks/cephfs/fuse_mount.py index 872412f912d..8d8410c69ed 100644 --- a/qa/tasks/cephfs/fuse_mount.py +++ b/qa/tasks/cephfs/fuse_mount.py @@ -222,6 +222,15 @@ class FuseMount(CephFSMount): except run.CommandFailedError: log.info('Failed to unmount ceph-fuse on {name}, aborting...'.format(name=self.client_remote.name)) + self.client_remote.run(args=[ + 'sudo', + run.Raw('PATH=/usr/sbin:$PATH'), + 'lsof', + run.Raw(';'), + 'ps', + 'auxf', + ]) + # abort the fuse mount, killing all hung processes if self._fuse_conn: self.run_python(dedent(""" diff --git a/qa/tasks/cephfs/kernel_mount.py b/qa/tasks/cephfs/kernel_mount.py index 105dd4025fa..bfa1ac67916 100644 --- a/qa/tasks/cephfs/kernel_mount.py +++ b/qa/tasks/cephfs/kernel_mount.py @@ -98,7 +98,17 @@ class KernelMount(CephFSMount): if force: cmd.append('-f') - self.client_remote.run(args=cmd) + try: + self.client_remote.run(args=cmd) + except Exception as e: + self.client_remote.run(args=[ + 'sudo', + run.Raw('PATH=/usr/sbin:$PATH'), + 'lsof', + run.Raw(';'), + 'ps', 'auxf', + ]) + raise e rproc = self.client_remote.run( args=[ -- 2.39.5