]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: use customize_container_mounts in get_container_mounts 54399/head
authorJohn Mulligan <jmulligan@redhat.com>
Sat, 4 Nov 2023 23:48:08 +0000 (19:48 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Sat, 11 Nov 2023 13:10:49 +0000 (08:10 -0500)
Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/cephadm.py

index 2bf31527fbfd9b98e972140a0a9be95813339712..c9bc3a787579c0d802ee52370ab8fe9a7bb17abf 100755 (executable)
@@ -2708,36 +2708,14 @@ def get_container_mounts(
 
     assert ident.fsid
     assert ident.daemon_id
+    # Ceph daemon types are special cased here beacause of the no_config
+    # option which JJM thinks is *only* used by cephadm shell
     if daemon_type in ceph_daemons():
         mounts = Ceph.get_ceph_mounts(ctx, ident, no_config=no_config)
-
-    if daemon_type in Monitoring.components:
-        monitoring = Monitoring.create(ctx, ident)
-        monitoring.customize_container_mounts(ctx, mounts)
-
-    if daemon_type == NFSGanesha.daemon_type:
-        nfs_ganesha = NFSGanesha.create(ctx, ident)
-        nfs_ganesha.customize_container_mounts(ctx, mounts)
-
-    if daemon_type == HAproxy.daemon_type:
-        haproxy = HAproxy.create(ctx, ident)
-        haproxy.customize_container_mounts(ctx, mounts)
-
-    if daemon_type == CephNvmeof.daemon_type:
-        nvmeof = CephNvmeof.create(ctx, ident)
-        nvmeof.customize_container_mounts(ctx, mounts)
-
-    if daemon_type == CephIscsi.daemon_type:
-        iscsi = CephIscsi.create(ctx, ident)
-        iscsi.customize_container_mounts(ctx, mounts)
-
-    if daemon_type == Keepalived.daemon_type:
-        keepalive = Keepalived.create(ctx, ident)
-        keepalive.customize_container_mounts(ctx, mounts)
-
-    if daemon_type == CustomContainer.daemon_type:
-        cc = CustomContainer.create(ctx, ident)
-        cc.customize_container_mounts(ctx, mounts)
+    else:
+        daemon = daemon_form_create(ctx, ident)
+        assert isinstance(daemon, ContainerDaemonForm)
+        daemon.customize_container_mounts(ctx, mounts)
 
     _update_podman_mounts(ctx, mounts)
     return mounts