From bd226050066b126f66b299bcf94ccc9e22d8df8c Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Fri, 20 Oct 2023 11:20:36 -0400 Subject: [PATCH] cephadm: eliminate the _get_daemon_args function 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 --- src/cephadm/cephadm.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/cephadm/cephadm.py b/src/cephadm/cephadm.py index 2c3e325c0a5..32d229a3169 100755 --- a/src/cephadm/cephadm.py +++ b/src/cephadm/cephadm.py @@ -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, -- 2.39.5