]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/cephadm: Limit the value of max-namespaces-per-subsystem.
authorGil Bregman <gbregman@il.ibm.com>
Sun, 12 Oct 2025 09:50:29 +0000 (12:50 +0300)
committerGil Bregman <gbregman@il.ibm.com>
Sun, 12 Oct 2025 09:50:29 +0000 (12:50 +0300)
Fixes: https://tracker.ceph.com/issues/73505
Signed-off-by: Gil Bregman <gbregman@il.ibm.com>
src/python-common/ceph/deployment/service_spec.py

index ff10b5fd2dee725e61bc41194b1f8a0c173a3b5a..233f74ffa8b3f4e078ebff99ed6b2f10f22940c9 100644 (file)
@@ -2057,6 +2057,10 @@ class NvmeofServiceSpec(ServiceSpec):
         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")
+        max_per_subsys = self.max_namespaces_per_subsystem
+        if max_per_subsys is not None and max_per_subsys > 2048:
+            raise SpecValidationError("Max namespaces per subsystem can't be "
+                                      "greater than 2048")
         verify_positive_int(self.max_hosts_per_subsystem, "Max hosts per subsystem")
         verify_non_negative_number(self.subsystem_cache_expiration,
                                    "Subsystem cache expiration period")