# 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.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
# Wait for OSD to come up so that subsequent injectargs etc will
# definitely succeed
- LocalCephCluster(LocalContext()).mon_manager.wait_for_all_up(timeout=30)
+ LocalCephCluster(LocalContext()).mon_manager.wait_for_all_osds_up(timeout=30)
# List of client mounts, sufficient to run the selected tests
clients = [i.__str__() for i in range(0, max_required_clients)]