]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/test_orchestrator: List nfs daemon
authorVarsha Rao <varao@redhat.com>
Mon, 1 Jun 2020 15:27:45 +0000 (20:57 +0530)
committerVarsha Rao <varao@redhat.com>
Fri, 5 Jun 2020 11:28:51 +0000 (16:58 +0530)
This patch adds dummy data for nfs ganesha daemon and adds nfs to list of
supported service type.

Signed-off-by: Varsha Rao <varao@redhat.com>
src/pybind/mgr/test_orchestrator/dummy_data.json
src/pybind/mgr/test_orchestrator/module.py

index 83c937a09cb90c7d8db0943bce87c9d8b63b0700..85f0d82f410abfefc669d3efe3e7fc322c568d7e 100644 (file)
         "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": [
       "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"
     }
   ]
 }
index d7ef5d5bcc7978344134facd43be171fd5a790f7..beb58220997aed07b03077280b23935e14540a13 100644 (file)
@@ -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()