]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: move where _get_container_mounts_for_type is called
authorJohn Mulligan <jmulligan@redhat.com>
Sat, 4 Nov 2023 20:36:23 +0000 (16:36 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Tue, 7 Nov 2023 12:51:51 +0000 (07:51 -0500)
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 <jmulligan@redhat.com>
src/cephadm/cephadm.py

index 478de27f0b5ef67e157752f94fb646461cb49c70..e9e85a96b19dc2480a6fc3247f1583511d2131bb 100755 (executable)
@@ -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)