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)
+ self.setup_netns()
log.info('Mounting kclient client.{id} at {remote} {mnt}...'.format(
id=self.client_id, remote=self.client_remote, mnt=self.mountpoint))
"mds", "allow",
"mon", "allow r"])
- open("./keyring", "a").write(p.stdout.getvalue())
+ open("./keyring", "ab").write(p.stdout.getvalue())
if use_kernel_client:
- mount = LocalKernelMount(ctx, test_dir, client_id)
+ mount = LocalKernelMount(ctx, test_dir, client_id, opt_brxnet)
else:
- mount = LocalFuseMount(ctx, test_dir, client_id)
+ mount = LocalFuseMount(ctx, test_dir, client_id, opt_brxnet)
mounts.append(mount)
if os.path.exists(mount.mountpoint):