prefix = [os.path.join(BIN_PREFIX, "ceph-fuse")]
if os.getuid() != 0:
- prefix += ["--client-die-on-failed-remount=false"]
+ prefix += ["--client_die_on_failed_dentry_invalidate=false"]
if mount_path is not None:
prefix += ["--client_mountpoint={0}".format(mount_path)]
# FIXME: unimplemented
pass
- def newfs(self, name):
- return LocalFilesystem(self._ctx, create=name)
+ def newfs(self, name='cephfs', create=True):
+ return LocalFilesystem(self._ctx, name=name, create=create)
class LocalMgrCluster(LocalCephCluster, MgrCluster):
class LocalFilesystem(Filesystem, LocalMDSCluster):
- def __init__(self, ctx, fscid=None, create=None):
+ def __init__(self, ctx, fscid=None, name='cephfs', create=False):
# Deliberately skip calling parent constructor
self._ctx = ctx
self.id = None
self.name = None
+ self.ec_profile = None
self.metadata_pool_name = None
+ self.metadata_overlay = False
+ self.data_pool_name = None
self.data_pools = None
# Hack: cheeky inspection of ceph.conf to see what MDSs exist
self._conf = defaultdict(dict)
- if create is not None:
+ if name is not None:
if fscid is not None:
raise RuntimeError("cannot specify fscid when creating fs")
- if create is True:
- self.name = 'cephfs'
- else:
- self.name = create
- self.create()
- elif fscid is not None:
- self.id = fscid
- self.getinfo(refresh=True)
+ if create and not self.legacy_configured():
+ self.create()
+ else:
+ if fscid is not None:
+ self.id = fscid
+ self.getinfo(refresh=True)
# Stash a reference to the first created filesystem on ctx, so
# that if someone drops to the interactive shell they can easily