]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: convert iscsi type to a ContainerDaemonForm
authorJohn Mulligan <jmulligan@redhat.com>
Wed, 27 Sep 2023 22:15:37 +0000 (18:15 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 5 Oct 2023 21:05:33 +0000 (17:05 -0400)
Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/cephadm.py

index 7511b4cf17c27976ad945661fc186146ca76d0be..6faf348a7fded84de28481a2ed31437230fbfd28 100755 (executable)
@@ -728,7 +728,7 @@ class NFSGanesha(ContainerDaemonForm):
 
 
 @register_daemon_form
-class CephIscsi(DaemonForm):
+class CephIscsi(ContainerDaemonForm):
     """Defines a Ceph-Iscsi container"""
 
     daemon_type = 'iscsi'
@@ -923,6 +923,17 @@ done
         tcmu_container.cname = self.get_container_name(desc='tcmu')
         return tcmu_container
 
+    def container(self, ctx: CephadmContext) -> CephContainer:
+        return get_deployment_container(ctx, self.identity)
+
+    def config_and_keyring(
+        self, ctx: CephadmContext
+    ) -> Tuple[Optional[str], Optional[str]]:
+        return get_config_and_keyring(ctx)
+
+    def uid_gid(self, ctx: CephadmContext) -> Tuple[int, int]:
+        return extract_uid_gid(ctx)
+
 
 ##################################
 
@@ -5205,22 +5216,6 @@ def _dispatch_deploy(
             endpoints=daemon_endpoints
         )
 
-    elif daemon_type == CephIscsi.daemon_type:
-        config, keyring = get_config_and_keyring(ctx)
-        uid, gid = extract_uid_gid(ctx)
-        c = get_deployment_container(ctx, ident)
-        deploy_daemon(
-            ctx,
-            ident,
-            c,
-            uid,
-            gid,
-            config=config,
-            keyring=keyring,
-            deployment_type=deployment_type,
-            endpoints=daemon_endpoints
-        )
-
     elif daemon_type == CephadmAgent.daemon_type:
         # get current user gid and uid
         uid = os.getuid()