Skip to content

Commit 0d8bd4d

Browse files
committed
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 <[email protected]>
1 parent c4d24e8 commit 0d8bd4d

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/pybind/mgr/cephadm/templates/services/nvmeof/ceph-nvmeof.conf.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ enable_monitor_client = {{ spec.enable_monitor_client }}
3030
max_hosts_per_namespace = {{ spec.max_hosts_per_namespace }}
3131
max_namespaces_with_netmask = {{ spec.max_namespaces_with_netmask }}
3232
max_subsystems = {{ spec.max_subsystems }}
33+
max_hosts = {{ spec.max_hosts }}
3334
max_namespaces = {{ spec.max_namespaces }}
3435
max_namespaces_per_subsystem = {{ spec.max_namespaces_per_subsystem }}
3536
max_hosts_per_subsystem = {{ spec.max_hosts_per_subsystem }}

src/pybind/mgr/cephadm/tests/test_services.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,10 @@ def test_nvmeof_config(self, _get_name, _run_cephadm, cephadm_module: CephadmOrc
379379
max_hosts_per_namespace = 8
380380
max_namespaces_with_netmask = 1000
381381
max_subsystems = 128
382+
max_hosts = 2048
382383
max_namespaces = 1024
383384
max_namespaces_per_subsystem = 256
384-
max_hosts_per_subsystem = 32
385+
max_hosts_per_subsystem = 128
385386
386387
[gateway-logs]
387388
log_level = INFO

src/python-common/ceph/deployment/service_spec.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1361,9 +1361,10 @@ def __init__(self,
13611361
max_hosts_per_namespace: Optional[int] = 8,
13621362
max_namespaces_with_netmask: Optional[int] = 1000,
13631363
max_subsystems: Optional[int] = 128,
1364+
max_hosts: Optional[int] = 2048,
13641365
max_namespaces: Optional[int] = 1024,
13651366
max_namespaces_per_subsystem: Optional[int] = 256,
1366-
max_hosts_per_subsystem: Optional[int] = 32,
1367+
max_hosts_per_subsystem: Optional[int] = 128,
13671368
server_key: Optional[str] = None,
13681369
server_cert: Optional[str] = None,
13691370
client_key: Optional[str] = None,
@@ -1471,6 +1472,8 @@ def __init__(self,
14711472
self.max_namespaces_with_netmask = max_namespaces_with_netmask
14721473
#: ``max_subsystems`` max number of subsystems
14731474
self.max_subsystems = max_subsystems
1475+
#: ``max_hosts`` max number of hosts on all subsystems
1476+
self.max_hosts = max_hosts
14741477
#: ``max_namespaces`` max number of namespaces on all subsystems
14751478
self.max_namespaces = max_namespaces
14761479
#: ``max_namespaces_per_subsystem`` max number of namespaces per one subsystem
@@ -1618,6 +1621,7 @@ def validate(self) -> None:
16181621
verify_non_negative_int(self.max_hosts_per_namespace, "Max hosts per namespace")
16191622
verify_non_negative_int(self.max_namespaces_with_netmask, "Max namespaces with netmask")
16201623
verify_positive_int(self.max_subsystems, "Max subsystems")
1624+
verify_positive_int(self.max_hosts, "Max hosts")
16211625
verify_positive_int(self.max_namespaces, "Max namespaces")
16221626
verify_positive_int(self.max_namespaces_per_subsystem, "Max namespaces per subsystem")
16231627
verify_positive_int(self.max_hosts_per_subsystem, "Max hosts per subsystem")

0 commit comments

Comments
 (0)