From: Varsha Rao Date: Wed, 4 Nov 2020 10:16:23 +0000 (+0530) Subject: mgr/rook: List nfs services in orch ls X-Git-Tag: v16.1.0~264^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7bd5f359385e63a3a543d7e1ce15a0f1b199b4cf;p=ceph.git mgr/rook: List nfs services in orch ls Fixes: https://tracker.ceph.com/issues/48071 Signed-off-by: Varsha Rao --- diff --git a/src/pybind/mgr/rook/module.py b/src/pybind/mgr/rook/module.py index 362319a8f69..1f775eefc2c 100644 --- a/src/pybind/mgr/rook/module.py +++ b/src/pybind/mgr/rook/module.py @@ -351,6 +351,28 @@ class RookOrchestrator(MgrModule, orchestrator.Orchestrator): last_refresh=now, ) + # CephNFSes + all_nfs = self.rook_cluster.rook_api_get( + "cephnfses/") + self.log.warning('CephNFS %s' % all_nfs) + for nfs in all_nfs.get('items', []): + nfs_name = nfs['metadata']['name'] + svc = 'nfs.' + nfs_name + if svc in spec: + continue + active = nfs['spec'].get('server', {}).get('active') + spec[svc] = orchestrator.ServiceDescription( + spec=NFSServiceSpec( + service_id=nfs_name, + pool=nfs['spec']['rados']['pool'], + namespace=nfs['spec']['rados'].get('namespace', None), + placement=PlacementSpec(count=active), + ), + size=active, + container_image_name=image_name, + last_refresh=now, + ) + for dd in self._list_daemons(): if dd.service_name() not in spec: continue