From: Varsha Rao Date: Mon, 1 Jun 2020 15:27:45 +0000 (+0530) Subject: mgr/test_orchestrator: List nfs daemon X-Git-Tag: v16.1.0~2112^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a104405ffc204937cc0be9f3a6ff5229fab144aa;p=ceph.git mgr/test_orchestrator: List nfs daemon This patch adds dummy data for nfs ganesha daemon and adds nfs to list of supported service type. Signed-off-by: Varsha Rao --- diff --git a/src/pybind/mgr/test_orchestrator/dummy_data.json b/src/pybind/mgr/test_orchestrator/dummy_data.json index 83c937a09cb9..85f0d82f410a 100644 --- a/src/pybind/mgr/test_orchestrator/dummy_data.json +++ b/src/pybind/mgr/test_orchestrator/dummy_data.json @@ -311,6 +311,35 @@ "running": 2, "size": 2 } + }, + { + "placement": { + "hosts": [ + { + "hostname": "mgr0", + "name": "", + "network": "" + }, + { + "hostname": "osd0", + "name": "", + "network": "" + } + ] + }, + "service_id": "ganesha-vstart", + "service_name": "nfs.ganesha-vstart", + "service_type": "nfs", + "pool": "nfs-ganesha", + "namespace": "vstart", + "status": { + "container_image_id": "36114e38494190b0c9d4b088c12e6e4086e8017b96b4d5fc14eb5406bd51b55b", + "container_image_name": "quay.io/ceph-ci/ceph:master", + "created": "2020-04-16T03:39:39.512721", + "last_refresh": "2020-04-16T06:51:42.412980", + "running": 1, + "size": 1 + } } ], "daemons": [ @@ -369,6 +398,20 @@ "status": 1, "status_desc": "running", "version": "16.0.0-827-g61ad12e" + }, + { + "container_id": "aeba86ca1655", + "container_image_id": "36114e38494190b0c9d4b088c12e6e4086e8017b96b4d5fc14eb5406bd51b55b", + "container_image_name": "quay.io/ceph-ci/ceph:master", + "created": "2020-04-16T05:44:41.551646", + "daemon_id": "ganesha-vstart.osd0", + "daemon_type": "nfs", + "hostname": "osd0", + "last_refresh": "2020-04-16T06:51:43.182937", + "started": "2020-04-16T05:44:41.606514", + "status": 1, + "status_desc": "running", + "version": "3.2" } ] } diff --git a/src/pybind/mgr/test_orchestrator/module.py b/src/pybind/mgr/test_orchestrator/module.py index d7ef5d5bcc79..beb58220997a 100644 --- a/src/pybind/mgr/test_orchestrator/module.py +++ b/src/pybind/mgr/test_orchestrator/module.py @@ -162,7 +162,7 @@ class TestOrchestrator(MgrModule, orchestrator.Orchestrator): def _get_ceph_daemons(self): # type: () -> List[orchestrator.DaemonDescription] """ Return ceph daemons on the running host.""" - types = ("mds", "osd", "mon", "rgw", "mgr") + types = ("mds", "osd", "mon", "rgw", "mgr", "nfs") out = map(str, check_output(['ps', 'aux']).splitlines()) processes = [p for p in out if any( [('ceph-{} '.format(t) in p) for t in types])] @@ -225,7 +225,7 @@ class TestOrchestrator(MgrModule, orchestrator.Orchestrator): it returns the mgr we're running in. """ if daemon_type: - daemon_types = ("mds", "osd", "mon", "rgw", "mgr", "iscsi", "crash") + daemon_types = ("mds", "osd", "mon", "rgw", "mgr", "iscsi", "crash", "nfs") assert daemon_type in daemon_types, daemon_type + " unsupported" daemons = self._daemons if self._daemons else self._get_ceph_daemons()