]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
samba: wait for smbd process to exit
authorSage Weil <sage@inktank.com>
Sun, 4 Aug 2013 21:54:20 +0000 (14:54 -0700)
committerSage Weil <sage@inktank.com>
Sun, 4 Aug 2013 21:54:20 +0000 (14:54 -0700)
I saw

2013-08-03T12:56:26.641 DEBUG:teuthology.orchestra.run:Running [10.214.131.28]: 'sudo killall -9 smbd'
2013-08-03T12:56:26.727 DEBUG:teuthology.orchestra.run:Running [10.214.131.28]: 'sudo lsof /home/ubuntu/cephtest/93695/mnt.0'
2013-08-03T12:56:26.830 INFO:teuthology.orchestra.run.out:[10.214.131.28]: COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
2013-08-03T12:56:26.830 INFO:teuthology.orchestra.run.out:[10.214.131.28]: smbd    12381 root  cwd    DIR    0,0        0    1 /home/ubuntu/cephtest/93695/mnt.0

which makes me think we just need to wait a moment before
attempting the umount?

Signed-off-by: Sage Weil <sage@inktank.com>
teuthology/task/samba.py

index 4c2294993d8e8692bb979e4aea5eda0fd6cfaca6..a319ca570c4c116a3729cedc0eac927f5ebf9a49 100644 (file)
@@ -196,7 +196,12 @@ def task(ctx, config):
             try:
                 remote.run(
                     args=[
+                        'while',
                         'sudo', 'killall', '-9', 'smbd',
+                        run.Raw(';'),
+                        'do', 'sleep', '1',
+                        run.Raw(';'),
+                        'done',
                         ],
                     )