def netns_name(self, name):
self._netns_name = name
+ def assert_that_ceph_fs_exists(self):
+ output = self.client_remote.run(args='ceph fs ls', stdout=StringIO()).\
+ stdout.getvalue()
+ if self.cephfs_name:
+ assert self.cephfs_name in output, \
+ 'expected ceph fs is not present on the cluster'
+ log.info(f'Mounting Ceph FS {self.cephfs_name}; just confirmed its presence on cluster')
+ else:
+ assert 'No filesystems enabled' not in output, \
+ 'ceph cluster has no ceph fs, not even the default ceph fs'
+ log.info('Mounting default Ceph FS; just confirmed its presence on cluster')
+
def assert_and_log_minimum_mount_details(self):
"""
Make sure we have minimum details required for mounting. Ideally, this
'3. the remote machine where CephFS will be mounted.\n')
raise RuntimeError(errmsg)
+ self.assert_that_ceph_fs_exists()
+
log.info('Mounting Ceph FS. Following are details of mount; remember '
'"None" represents Python type None -')
log.info(f'self.client_remote.hostname = {self.client_remote.hostname}')