]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: remove gateways property from Ceph type
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 3 Oct 2023 20:33:46 +0000 (16:33 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 5 Oct 2023 21:05:33 +0000 (17:05 -0400)
The gateways list property of the Ceph type was used in exactly one
place. In order to provide a clearer structure to the classes in
cephadm, remove this property and simply list the daemon types
specifically where they are needed.

In the future, I hope to see these handled in a class/object based
manner but this is still better for now.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/cephadm.py

index 4901abf42cd37692049d6ddf6b6bad4eda5ffef7..ed6841bbae891b575a959572ac94b76901591477 100755 (executable)
@@ -211,7 +211,6 @@ class ContainerInfo:
 class Ceph(DaemonForm):
     daemons = ('mon', 'mgr', 'osd', 'mds', 'rgw', 'rbd-mirror',
                'crash', 'cephfs-mirror', 'ceph-exporter')
-    gateways = ('iscsi', 'nfs', 'nvmeof')
 
     @classmethod
     def for_daemon_type(cls, daemon_type: str) -> bool:
@@ -2553,7 +2552,11 @@ def get_container(
         envs.append('TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES=134217728')
     if container_args is None:
         container_args = []
-    if daemon_type in Ceph.daemons or daemon_type in Ceph.gateways:
+    unlimited_daemons = set(Ceph.daemons)
+    unlimited_daemons.add(CephIscsi.daemon_type)
+    unlimited_daemons.add(CephNvmeof.daemon_type)
+    unlimited_daemons.add(NFSGanesha.daemon_type)
+    if daemon_type in unlimited_daemons:
         set_pids_limit_unlimited(ctx, container_args)
     if daemon_type in ['mon', 'osd']:
         # mon and osd need privileged in order for libudev to query devices