From: Gil Bregman Date: Mon, 3 Feb 2025 21:13:49 +0000 (+0200) Subject: mgr/cephadm/nvmeof: Add max_hosts field to NVMeOF configuration and update default... X-Git-Tag: v20.0.0~267^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F61632%2Fhead;p=ceph.git mgr/cephadm/nvmeof: Add max_hosts field to NVMeOF configuration and update default values Fixes https://tracker.ceph.com/issues/69759 Signed-off-by: Gil Bregman --- diff --git a/src/pybind/mgr/cephadm/templates/services/nvmeof/ceph-nvmeof.conf.j2 b/src/pybind/mgr/cephadm/templates/services/nvmeof/ceph-nvmeof.conf.j2 index 016ed312a1d..ad6574786a3 100644 --- a/src/pybind/mgr/cephadm/templates/services/nvmeof/ceph-nvmeof.conf.j2 +++ b/src/pybind/mgr/cephadm/templates/services/nvmeof/ceph-nvmeof.conf.j2 @@ -30,6 +30,7 @@ enable_monitor_client = {{ spec.enable_monitor_client }} max_hosts_per_namespace = {{ spec.max_hosts_per_namespace }} max_namespaces_with_netmask = {{ spec.max_namespaces_with_netmask }} max_subsystems = {{ spec.max_subsystems }} +max_hosts = {{ spec.max_hosts }} max_namespaces = {{ spec.max_namespaces }} max_namespaces_per_subsystem = {{ spec.max_namespaces_per_subsystem }} max_hosts_per_subsystem = {{ spec.max_hosts_per_subsystem }} diff --git a/src/pybind/mgr/cephadm/tests/test_services.py b/src/pybind/mgr/cephadm/tests/test_services.py index a1bbe87276b..cf38a72acc6 100644 --- a/src/pybind/mgr/cephadm/tests/test_services.py +++ b/src/pybind/mgr/cephadm/tests/test_services.py @@ -379,9 +379,10 @@ enable_monitor_client = True max_hosts_per_namespace = 8 max_namespaces_with_netmask = 1000 max_subsystems = 128 +max_hosts = 2048 max_namespaces = 1024 max_namespaces_per_subsystem = 256 -max_hosts_per_subsystem = 32 +max_hosts_per_subsystem = 128 [gateway-logs] log_level = INFO diff --git a/src/python-common/ceph/deployment/service_spec.py b/src/python-common/ceph/deployment/service_spec.py index 140871b2061..d6d1a7f3801 100644 --- a/src/python-common/ceph/deployment/service_spec.py +++ b/src/python-common/ceph/deployment/service_spec.py @@ -1361,9 +1361,10 @@ class NvmeofServiceSpec(ServiceSpec): max_hosts_per_namespace: Optional[int] = 8, max_namespaces_with_netmask: Optional[int] = 1000, max_subsystems: Optional[int] = 128, + max_hosts: Optional[int] = 2048, max_namespaces: Optional[int] = 1024, max_namespaces_per_subsystem: Optional[int] = 256, - max_hosts_per_subsystem: Optional[int] = 32, + max_hosts_per_subsystem: Optional[int] = 128, server_key: Optional[str] = None, server_cert: Optional[str] = None, client_key: Optional[str] = None, @@ -1471,6 +1472,8 @@ class NvmeofServiceSpec(ServiceSpec): self.max_namespaces_with_netmask = max_namespaces_with_netmask #: ``max_subsystems`` max number of subsystems self.max_subsystems = max_subsystems + #: ``max_hosts`` max number of hosts on all subsystems + self.max_hosts = max_hosts #: ``max_namespaces`` max number of namespaces on all subsystems self.max_namespaces = max_namespaces #: ``max_namespaces_per_subsystem`` max number of namespaces per one subsystem @@ -1618,6 +1621,7 @@ class NvmeofServiceSpec(ServiceSpec): verify_non_negative_int(self.max_hosts_per_namespace, "Max hosts per namespace") verify_non_negative_int(self.max_namespaces_with_netmask, "Max namespaces with netmask") verify_positive_int(self.max_subsystems, "Max subsystems") + verify_positive_int(self.max_hosts, "Max hosts") verify_positive_int(self.max_namespaces, "Max namespaces") verify_positive_int(self.max_namespaces_per_subsystem, "Max namespaces per subsystem") verify_positive_int(self.max_hosts_per_subsystem, "Max hosts per subsystem")