Skip to content

Commit 9aec9c6

Browse files
authored
Merge pull request ceph#65898 from gbregman/main
mgr/cephadm: Limit the value of max-namespaces-per-subsystem.
2 parents bcdf1c0 + 3dcc10f commit 9aec9c6

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)