]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
nfs: more lsof output, on clients too
authorGreg Farnum <greg@inktank.com>
Thu, 25 Sep 2014 19:43:39 +0000 (12:43 -0700)
committerGreg Farnum <greg@inktank.com>
Thu, 25 Sep 2014 21:44:20 +0000 (14:44 -0700)
Signed-off-by: Greg Farnum <greg@inktank.com>
teuthology/task/knfsd.py
teuthology/task/nfs.py

index fea04c14c68b116223da47be2afc10e46945a18f..bd8c9c99657352544335c6fcf8537becb0d6c82e 100644 (file)
@@ -138,7 +138,7 @@ def task(ctx, config):
                 remote.run(
                     args=[
                         'sudo',
-                        'lsof', '-V',
+                        'lsof', '-V', '+D',
                         '{mnt}'.format(mnt=mnt),
                         ],
                     check_status=False
index 72a2981097349214a7e894904f4c4553478afdb0..54b29e8742b67f1ffa3728b9cb4ca0c3e914b578 100644 (file)
@@ -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,
+                        ],
+                    )