From: Michael Fritch Date: Mon, 15 Jun 2020 20:44:53 +0000 (-0600) Subject: mgr/test_orchestrator: add iscsi X-Git-Tag: wip-pdonnell-testing-20200918.022351~814^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=37826d41b0bcf755fc9a837c72741542022a019a;p=ceph-ci.git mgr/test_orchestrator: add iscsi Signed-off-by: Michael Fritch --- diff --git a/src/pybind/mgr/test_orchestrator/dummy_data.json b/src/pybind/mgr/test_orchestrator/dummy_data.json index 85f0d82f410..0eaa5af42cd 100644 --- a/src/pybind/mgr/test_orchestrator/dummy_data.json +++ b/src/pybind/mgr/test_orchestrator/dummy_data.json @@ -340,6 +340,36 @@ "running": 1, "size": 1 } + }, + { + "api_password": "api_password", + "api_user": "api_user", + "placement": { + "hosts": [ + { + "hostname": "mgr0", + "name": "", + "network": "" + }, + { + "hostname": "osd0", + "name": "", + "network": "" + } + ] + }, + "pool": "pool", + "service_id": "iscsi", + "service_name": "iscsi.iscsi", + "service_type": "iscsi", + "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": [ @@ -412,6 +442,20 @@ "status": 1, "status_desc": "running", "version": "3.2" + }, + { + "container_id": "e695cd698d8a", + "container_image_id": "36114e38494190b0c9d4b088c12e6e4086e8017b96b4d5fc14eb5406bd51b55b", + "container_image_name": "quay.io/ceph-ci/ceph:master", + "created": "2020-04-16T05:44:41.551646", + "daemon_id": "iscsi.osd0.abc123", + "daemon_type": "iscsi", + "hostname": "osd0", + "last_refresh": "2020-04-16T06:51:43.182937", + "started": "2020-04-16T05:44:41.606514", + "status": 1, + "status_desc": "running", + "version": "3.4" } ] } diff --git a/src/pybind/mgr/test_orchestrator/module.py b/src/pybind/mgr/test_orchestrator/module.py index 6e566909a4e..83100ab9a11 100644 --- a/src/pybind/mgr/test_orchestrator/module.py +++ b/src/pybind/mgr/test_orchestrator/module.py @@ -7,7 +7,7 @@ import functools import itertools from subprocess import check_output, CalledProcessError -from ceph.deployment.service_spec import NFSServiceSpec, ServiceSpec +from ceph.deployment.service_spec import ServiceSpec, NFSServiceSpec, IscsiServiceSpec try: from typing import Callable, List, Sequence, Tuple @@ -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", "nfs") + types = ("mds", "osd", "mon", "rgw", "mgr", "nfs", "iscsi") 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])] @@ -327,6 +327,16 @@ class TestOrchestrator(MgrModule, orchestrator.Orchestrator): def apply_nfs(self, spec): pass + @deferred_write("add_iscsi") + def add_iscsi(self, spec): + # type: (IscsiServiceSpec) -> None + pass + + @deferred_write("apply_iscsi") + def apply_iscsi(self, spec): + # type: (IscsiServiceSpec) -> None + pass + @deferred_write("add_mds") def add_mds(self, spec): pass