From e66dba6f24f9a80fe56226c1982f3407c8f602e6 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 (cherry picked from commit 4b638e702eed7c5d8be05fca3fc58e3b8cc470a0) Conflicts: src/pybind/mgr/dashboard/controllers/nvmeof.py --- src/pybind/mgr/cephadm/tests/test_services.py | 4 ++-- src/pybind/mgr/dashboard/controllers/nvmeof.py | 2 +- .../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/python-common/ceph/deployment/service_spec.py | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pybind/mgr/cephadm/tests/test_services.py b/src/pybind/mgr/cephadm/tests/test_services.py index bf1bc5d7bd2..253b1445e94 100644 --- a/src/pybind/mgr/cephadm/tests/test_services.py +++ b/src/pybind/mgr/cephadm/tests/test_services.py @@ -389,8 +389,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 e69b00d27d2..7285b118783 100644 --- a/src/pybind/mgr/dashboard/controllers/nvmeof.py +++ b/src/pybind/mgr/dashboard/controllers/nvmeof.py @@ -195,7 +195,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), }, 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 90817e13f9e..563ef314386 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 0f34803b7ef..af178560b30 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 3c6a75d26ae..02d0030d6cf 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/python-common/ceph/deployment/service_spec.py b/src/python-common/ceph/deployment/service_spec.py index ec401c7e8d8..2f5b01c45ba 100644 --- a/src/python-common/ceph/deployment/service_spec.py +++ b/src/python-common/ceph/deployment/service_spec.py @@ -1409,8 +1409,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