From: John Mulligan Date: Sat, 4 Nov 2023 20:36:23 +0000 (-0400) Subject: cephadm: move where _get_container_mounts_for_type is called X-Git-Tag: v19.0.0~118^2~3 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=38f5b55a95c35db36a7baeb653fbefd1efdd36dc;p=ceph-ci.git 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 --- 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)