return self.client_remote.run(args=["ls", "-d", self.mountpoint], check_status=False, cwd=self.test_dir, timeout=(15*60)).exitstatus == 0
def umount(self):
+ if not self.is_mounted():
+ return
+
try:
log.info('Running fusermount -u on {name}...'.format(name=self.client_remote.name))
self.client_remote.run(
self.mounted = True
def umount(self, force=False):
+ if not self.is_mounted():
+ return
+
log.debug('Unmounting client client.{id}...'.format(id=self.client_id))
cmd=['sudo', 'umount', self.mountpoint]
log.info("I think my launching pid was {0}".format(self.fuse_daemon.subproc.pid))
return path
- def umount(self, force=False):
- log.debug('Unmounting client client.{id}...'.format(id=self.client_id))
-
- cmd=['sudo', 'umount', self.mountpoint]
- if force:
- cmd.append('-f')
-
- try:
- self.client_remote.run(args=cmd, timeout=(15*60), omit_sudo=False)
- except Exception as e:
- self.client_remote.run(args=[
- 'sudo',
- Raw('PATH=/usr/sbin:$PATH'),
- 'lsof',
- Raw(';'),
- 'ps', 'auxf',
- ], timeout=(15*60), omit_sudo=False)
- raise e
-
- rproc = self.client_remote.run(args=[
- 'rmdir',
- '--',
- self.mountpoint,
- ])
- rproc.wait()
- self.mounted = False
-
def mount(self, mount_path=None, mount_fs_name=None, mount_options=[]):
self.setupfs(name=mount_fs_name)
log.info("I think my launching pid was {0}".format(self.fuse_daemon.subproc.pid))
return path
- def umount(self):
- if self.is_mounted():
- super(LocalFuseMount, self).umount()
-
def mount(self, mount_path=None, mount_fs_name=None, mountpoint=None, mount_options=[]):
if mountpoint is not None:
self.mountpoint = mountpoint