Skip to content

Commit add274c

Browse files
committed
mgr/cephadm: Limit the value of max-namespaces-per-subsystem.
Fixes: https://tracker.ceph.com/issues/73505 Signed-off-by: Gil Bregman <[email protected]>
1 parent 91459a9 commit add274c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2057,6 +2057,10 @@ def validate(self) -> None:
20572057
verify_positive_int(self.max_hosts, "Max hosts")
20582058
verify_positive_int(self.max_namespaces, "Max namespaces")
20592059
verify_positive_int(self.max_namespaces_per_subsystem, "Max namespaces per subsystem")
2060+
max_per_subsys = self.max_namespaces_per_subsystem
2061+
if max_per_subsys is not None and max_per_subsys > 2048:
2062+
raise SpecValidationError("Max namespaces per subsystem can't be "
2063+
"greater than 2048")
20602064
verify_positive_int(self.max_hosts_per_subsystem, "Max hosts per subsystem")
20612065
verify_non_negative_number(self.subsystem_cache_expiration,
20622066
"Subsystem cache expiration period")

0 commit comments

Comments
 (0)