From: Greg Farnum Date: Thu, 25 Sep 2014 19:43:39 +0000 (-0700) Subject: nfs: more lsof output, on clients too X-Git-Tag: 1.1.0~1147 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a07f79a79daf26e6999b8ab47db75a83b1c81570;p=teuthology.git nfs: more lsof output, on clients too Signed-off-by: Greg Farnum --- diff --git a/teuthology/task/knfsd.py b/teuthology/task/knfsd.py index fea04c14c6..bd8c9c9965 100644 --- a/teuthology/task/knfsd.py +++ b/teuthology/task/knfsd.py @@ -138,7 +138,7 @@ def task(ctx, config): remote.run( args=[ 'sudo', - 'lsof', '-V', + 'lsof', '-V', '+D', '{mnt}'.format(mnt=mnt), ], check_status=False diff --git a/teuthology/task/nfs.py b/teuthology/task/nfs.py index 72a2981097..54b29e8742 100644 --- a/teuthology/task/nfs.py +++ b/teuthology/task/nfs.py @@ -114,17 +114,27 @@ def task(ctx, config): for id_, remote in clients: log.debug('Unmounting nfs client client.{id}...'.format(id=id_)) mnt = os.path.join(testdir, 'mnt.{id}'.format(id=id_)) - remote.run( - args=[ - 'sudo', - 'umount', - mnt, - ], - ) - remote.run( - args=[ - 'rmdir', - '--', - mnt, - ], - ) + try: + remote.run( + args=[ + 'sudo', + 'lsof', '-V', '+D', + '{mnt}'.format(mnt=mnt), + ], + check_status=False + ) + finally: + remote.run( + args=[ + 'sudo', + 'umount', + mnt, + ], + ) + remote.run( + args=[ + 'rmdir', + '--', + mnt, + ], + )