1
0
mirror of https://github.com/ceph/ceph synced 2025-03-25 11:48:05 +00:00

qa/tasks/cephfs: fix kernel force umount

Fixes: http://tracker.ceph.com/issues/18396
Signed-off-by: Yan, Zheng <zyan@redhat.com>
This commit is contained in:
Yan, Zheng 2017-01-09 20:47:37 +08:00
parent 95c01de421
commit 4cdeeaac10

View File

@ -87,15 +87,15 @@ class KernelMount(CephFSMount):
self.mounted = True
def umount(self):
def umount(self, force=False):
log.debug('Unmounting client client.{id}...'.format(id=self.client_id))
self.client_remote.run(
args=[
'sudo',
'umount',
self.mountpoint,
],
)
cmd=['sudo', 'umount', self.mountpoint]
if force:
cmd.append('-f')
self.client_remote.run(args=cmd)
self.client_remote.run(
args=[
'rmdir',
@ -116,7 +116,7 @@ class KernelMount(CephFSMount):
return
try:
self.umount()
self.umount(force)
except CommandFailedError:
if not force:
raise