From 38f5b55a95c35db36a7baeb653fbefd1efdd36dc Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Sat, 4 Nov 2023 16:36:23 -0400 Subject: [PATCH] cephadm: move where _get_container_mounts_for_type is called The _get_container_mounts_for_type method is only useful for ceph based daemon types. There's no need to call this method in a universal context. Signed-off-by: John Mulligan --- src/cephadm/cephadm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cephadm/cephadm.py b/src/cephadm/cephadm.py index 478de27f0b5..e9e85a96b19 100755 --- a/src/cephadm/cephadm.py +++ b/src/cephadm/cephadm.py @@ -2566,11 +2566,12 @@ def get_container_mounts( """ # unpack fsid and daemon_type from ident because they're used very frequently fsid, daemon_type = ident.fsid, ident.daemon_type - mounts = _get_container_mounts_for_type(ctx, fsid, daemon_type) + mounts: Dict[str, str] = {} assert ident.fsid assert ident.daemon_id if daemon_type in ceph_daemons(): + mounts = _get_container_mounts_for_type(ctx, fsid, daemon_type) data_dir = ident.data_dir(ctx.data_dir) if daemon_type == 'rgw': cdata_dir = '/var/lib/ceph/radosgw/ceph-rgw.%s' % (ident.daemon_id) -- 2.47.3