from teuthology.orchestra import remote as orchestra_remote
from teuthology.orchestra import run
+from teuthology.contextutil import MaxWhileTries
from .mount import CephFSMount
log = logging.getLogger(__name__)
+UMOUNT_TIMEOUT = 300
+
+
class KernelMount(CephFSMount):
def __init__(self, mons, test_dir, client_id, client_remote,
ipmi_user, ipmi_password, ipmi_domain):
self.client_remote.run(args=cmd)
- self.client_remote.run(
+ rproc = self.client_remote.run(
args=[
'rmdir',
'--',
self.mountpoint,
],
+ wait=False
)
+ run.wait([rproc], UMOUNT_TIMEOUT)
self.mounted = False
def cleanup(self):
try:
self.umount(force)
- except CommandFailedError:
+ except (CommandFailedError, MaxWhileTries):
if not force:
raise
import logging
from teuthology.misc import deep_merge
+from teuthology.orchestra.run import CommandFailedError
from teuthology import misc
+from teuthology.contextutil import MaxWhileTries
from cephfs.kernel_mount import KernelMount
log = logging.getLogger(__name__)
if mount.is_mounted():
try:
mount.umount()
- except CommandFailedError:
+ except (CommandFailedError, MaxWhileTries):
log.warn("Ordinary umount failed, forcing...")
forced = True
mount.umount_wait(force=True)