From: Sage Weil Date: Thu, 12 Mar 2020 18:41:37 +0000 (-0400) Subject: mgr/rook: show filesystems in 'orch ls' X-Git-Tag: v15.1.1~8^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b261e80fa9d5710b10fd980bcb091d11c0ce4a17;p=ceph.git mgr/rook: show filesystems in 'orch ls' The count vs size discrepancy is weird since rook things in terms of ranks (*2 if standby) vs just a count. Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/rook/module.py b/src/pybind/mgr/rook/module.py index ef72d26f59b2..32af1bba2dac 100644 --- a/src/pybind/mgr/rook/module.py +++ b/src/pybind/mgr/rook/module.py @@ -296,7 +296,30 @@ class RookOrchestrator(MgrModule, orchestrator.Orchestrator): last_refresh=now, ) - # FIXME: CephFilesystems + # CephFilesystems + all_fs = self.rook_cluster.rook_api_get( + "cephfilesystems/") + self.log.debug('CephFilesystems %s' % all_fs) + for fs in all_fs.get('items', []): + svc = 'mds.' + fs['metadata']['name'] + if svc in spec: + continue + # FIXME: we are conflating active (+ standby) with count + active = fs['spec'].get('metadataServer', {}).get('activeCount', 1) + total_mds = active + if fs['spec'].get('metadataServer', {}).get('activeStandby', False): + total_mds = active * 2 + spec[svc] = orchestrator.ServiceDescription( + service_name=svc, + spec=orchestrator.ServiceSpec( + svc, + placement=orchestrator.PlacementSpec(count=active), + ), + size=total_mds, + container_image_name=image_name, + last_refresh=now, + ) + # FIXME: CephObjectstores for dd in self._list_daemons():