From: Yan, Zheng Date: Wed, 19 Jul 2017 07:32:37 +0000 (+0800) Subject: qa/cephfs: lsof if umount fails X-Git-Tag: v12.1.2~43^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b49d6d8ead7fcc254f2995e4eb035b379123851b;p=ceph.git qa/cephfs: lsof if umount fails Signed-off-by: "Yan, Zheng" --- diff --git a/qa/tasks/cephfs/fuse_mount.py b/qa/tasks/cephfs/fuse_mount.py index 872412f912dec..8d8410c69edce 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 105dd4025faeb..bfa1ac679166b 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=[