]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: eliminate the _get_daemon_args function
authorJohn Mulligan <jmulligan@redhat.com>
Fri, 20 Oct 2023 15:20:36 +0000 (11:20 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Sat, 4 Nov 2023 18:53:07 +0000 (14:53 -0400)
Move the last remaining bit of daemon args logic (ceph) out of
the _get_daemon_args function and remove the function.

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

index 2c3e325c0a5831a4aeacb17b58f3f4445e600a49..32d229a3169a561f22f563a43a8bec152317a9a4 100755 (executable)
@@ -2318,17 +2318,6 @@ def get_legacy_daemon_fsid(ctx, cluster,
     return fsid
 
 
-def _get_daemon_args(ctx: CephadmContext, ident: 'DaemonIdentity') -> List[str]:
-    r = list()  # type: List[str]
-
-    daemon_type = ident.daemon_type
-    if Ceph.for_daemon_type(daemon_type) or OSD.for_daemon_type(daemon_type):
-        daemon = Ceph.create(ctx, ident)
-        r += daemon.get_daemon_args()
-
-    return r
-
-
 def create_daemon_dirs(
     ctx: CephadmContext,
     ident: 'DaemonIdentity',
@@ -2740,6 +2729,9 @@ def get_container(
     if container_args is None:
         container_args = []
     _update_pids_limit(ctx, daemon_type, container_args)
+    if Ceph.for_daemon_type(daemon_type) or OSD.for_daemon_type(daemon_type):
+        ceph_daemon = Ceph.create(ctx, ident)
+        d_args.extend(ceph_daemon.get_daemon_args())
     if daemon_type in ['mon', 'osd']:
         # mon and osd need privileged in order for libudev to query devices
         privileged = True
@@ -2836,7 +2828,6 @@ def get_container(
         d_args.extend(sg.get_daemon_args())
 
     _update_container_args_for_podman(ctx, ident, container_args)
-    d_args.extend(_get_daemon_args(ctx, ident))
     return CephContainer.for_daemon(
         ctx,
         ident=ident,