]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: move tracing get_daemon_args logic to class
authorJohn Mulligan <jmulligan@redhat.com>
Thu, 19 Oct 2023 20:19:21 +0000 (16:19 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Sat, 4 Nov 2023 18:53:06 +0000 (14:53 -0400)
Move the logic used to get deamon args into a method of the
Tracing class.
This requires an update to save a reference to ctx.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/cephadm.py

index c56eaf2f287e9e3f6f229931aa0a991c3a69d41f..088234afb5fc1279a2aa60569afb7933b9f8ff38 100755 (executable)
@@ -1662,6 +1662,11 @@ class Tracing(ContainerDaemonForm):
     def uid_gid(self, ctx: CephadmContext) -> Tuple[int, int]:
         return 65534, 65534
 
+    def get_daemon_args(self) -> List[str]:
+        return self.components[self.identity.daemon_type].get(
+            'daemon_args', []
+        )
+
 ##################################
 
 
@@ -2324,7 +2329,8 @@ def get_daemon_args(ctx: CephadmContext, ident: 'DaemonIdentity') -> List[str]:
         monitoring = Monitoring.create(ctx, ident)
         r += monitoring.get_daemon_args()
     elif daemon_type == 'jaeger-agent':
-        r.extend(Tracing.components[daemon_type]['daemon_args'])
+        tracing = Tracing.create(ctx, ident)
+        r += tracing.get_daemon_args()
     elif daemon_type == NFSGanesha.daemon_type:
         nfs_ganesha = NFSGanesha.init(ctx, ident.fsid, ident.daemon_id)
         r += nfs_ganesha.get_daemon_args()