]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: convert tracing type to a ContainerDaemonForm
authorJohn Mulligan <jmulligan@redhat.com>
Wed, 27 Sep 2023 22:09:47 +0000 (18:09 -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 bd116fd00636ee80133b5fc5de609bb3465aa395..5582e1ef692ff40f327971b7804443cef8f8d7dc 100755 (executable)
@@ -1356,7 +1356,7 @@ class Keepalived(ContainerDaemonForm):
 
 
 @register_daemon_form
-class Tracing(DaemonForm):
+class Tracing(ContainerDaemonForm):
     """Define the configs for the jaeger tracing containers"""
 
     components: Dict[str, Dict[str, Any]] = {
@@ -1404,6 +1404,14 @@ class Tracing(DaemonForm):
     def identity(self) -> DaemonIdentity:
         return self._identity
 
+    def container(self, ctx: CephadmContext) -> CephContainer:
+        # TODO(jjm) this looks to be the only container for deployment
+        # not using get_deployment_container. Previous oversight?
+        return get_container(ctx, self.identity)
+
+    def uid_gid(self, ctx: CephadmContext) -> Tuple[int, int]:
+        return 65534, 65534
+
 ##################################
 
 
@@ -5216,18 +5224,6 @@ def _dispatch_deploy(
             deployment_type=deployment_type,
             endpoints=daemon_endpoints,
         )
-    elif daemon_type in Tracing.components:
-        uid, gid = 65534, 65534
-        c = get_container(ctx, ident)
-        deploy_daemon(
-            ctx,
-            ident,
-            c,
-            uid,
-            gid,
-            deployment_type=deployment_type,
-            endpoints=daemon_endpoints,
-        )
 
     elif daemon_type == CephadmAgent.daemon_type:
         # get current user gid and uid