From 4b638e702eed7c5d8be05fca3fc58e3b8cc470a0 Mon Sep 17 00:00:00 2001 From: Gil Bregman Date: Mon, 14 Jul 2025 15:28:48 +0300 Subject: [PATCH] mgr/cephadm/nvmeof: Increase the default limit of max_namespaces Fixes https://tracker.ceph.com/issues/72108 Signed-off-by: Gil Bregman --- src/pybind/mgr/cephadm/tests/test_services.py | 4 ++-- src/pybind/mgr/dashboard/controllers/nvmeof.py | 4 ++-- .../nvmeof-subsystems-details.component.spec.ts | 2 +- .../nvmeof-subsystems-form.component.spec.ts | 2 +- .../dashboard/frontend/src/app/shared/api/nvmeof.service.ts | 2 +- src/pybind/mgr/dashboard/openapi.yaml | 2 +- src/python-common/ceph/deployment/service_spec.py | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/pybind/mgr/cephadm/tests/test_services.py b/src/pybind/mgr/cephadm/tests/test_services.py index 46cc2033b6538..e552c0e93c915 100644 --- a/src/pybind/mgr/cephadm/tests/test_services.py +++ b/src/pybind/mgr/cephadm/tests/test_services.py @@ -387,8 +387,8 @@ max_hosts_per_namespace = 8 max_namespaces_with_netmask = 1000 max_subsystems = 128 max_hosts = 2048 -max_namespaces = 2048 -max_namespaces_per_subsystem = 256 +max_namespaces = 4096 +max_namespaces_per_subsystem = 512 max_hosts_per_subsystem = 128 subsystem_cache_expiration = 5 diff --git a/src/pybind/mgr/dashboard/controllers/nvmeof.py b/src/pybind/mgr/dashboard/controllers/nvmeof.py index c7d5d320d95eb..34517159533a2 100644 --- a/src/pybind/mgr/dashboard/controllers/nvmeof.py +++ b/src/pybind/mgr/dashboard/controllers/nvmeof.py @@ -179,7 +179,7 @@ else: "Create a new NVMeoF subsystem", parameters={ "nqn": Param(str, "NVMeoF subsystem NQN"), - "max_namespaces": Param(int, "Maximum number of namespaces", True, 1024), + "max_namespaces": Param(int, "Maximum number of namespaces", True, 4096), "enable_ha": Param(bool, "Enable high availability"), "gw_group": Param(str, "NVMeoF gateway group", True, None), }, @@ -188,7 +188,7 @@ else: @NvmeofCLICommand("nvmeof subsystem add", model.RequestStatus) @convert_to_model(model.SubsystemStatus) @handle_nvmeof_error - def create(self, nqn: str, enable_ha: bool = True, max_namespaces: int = 1024, + def create(self, nqn: str, enable_ha: bool = True, max_namespaces: int = 4096, gw_group: Optional[str] = None, traddr: Optional[str] = None): return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.create_subsystem( NVMeoFClient.pb2.create_subsystem_req( diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-details/nvmeof-subsystems-details.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-details/nvmeof-subsystems-details.component.spec.ts index 90817e13f9ead..563ef314386fb 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-details/nvmeof-subsystems-details.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-details/nvmeof-subsystems-details.component.spec.ts @@ -27,7 +27,7 @@ describe('NvmeofSubsystemsDetailsComponent', () => { subtype: 'NVMe', nqn: 'nqn.2001-07.com.ceph:1720603703820', namespace_count: 1, - max_namespaces: 256 + max_namespaces: 4096 }; component.permissions = new Permissions({ grafana: ['read'] diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystems-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystems-form.component.spec.ts index 0f34803b7efb1..af178560b30ca 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystems-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystems-form.component.spec.ts @@ -80,7 +80,7 @@ describe('NvmeofSubsystemsFormComponent', () => { }); it(`should give error on max_namespaces greater than ${MAX_NAMESPACE}`, () => { - formHelper.setValue('max_namespaces', 2000); + formHelper.setValue('max_namespaces', 6000); component.onSubmit(); formHelper.expectError('max_namespaces', 'max'); }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/nvmeof.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/nvmeof.service.ts index 3c6a75d26aeee..02d0030d6cff5 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/nvmeof.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/nvmeof.service.ts @@ -6,7 +6,7 @@ import { Observable, of as observableOf } from 'rxjs'; import { catchError, mapTo } from 'rxjs/operators'; import { CephServiceSpec } from '../models/service.interface'; -export const MAX_NAMESPACE = 1024; +export const MAX_NAMESPACE = 4096; export type GatewayGroup = CephServiceSpec; diff --git a/src/pybind/mgr/dashboard/openapi.yaml b/src/pybind/mgr/dashboard/openapi.yaml index 2facd7f22d88e..be1ff6b5af12f 100755 --- a/src/pybind/mgr/dashboard/openapi.yaml +++ b/src/pybind/mgr/dashboard/openapi.yaml @@ -8559,7 +8559,7 @@ paths: description: NVMeoF gateway group type: string max_namespaces: - default: 1024 + default: 4096 description: Maximum number of namespaces type: integer nqn: diff --git a/src/python-common/ceph/deployment/service_spec.py b/src/python-common/ceph/deployment/service_spec.py index ced9018a58d20..c75139b7b454a 100644 --- a/src/python-common/ceph/deployment/service_spec.py +++ b/src/python-common/ceph/deployment/service_spec.py @@ -1407,8 +1407,8 @@ class NvmeofServiceSpec(ServiceSpec): max_namespaces_with_netmask: Optional[int] = 1000, max_subsystems: Optional[int] = 128, max_hosts: Optional[int] = 2048, - max_namespaces: Optional[int] = 2048, - max_namespaces_per_subsystem: Optional[int] = 256, + max_namespaces: Optional[int] = 4096, + max_namespaces_per_subsystem: Optional[int] = 512, max_hosts_per_subsystem: Optional[int] = 128, subsystem_cache_expiration: Optional[int] = 5, server_key: Optional[str] = None, -- 2.39.5