From 9bb5ff49ffdfd44a80e06aa9182de6798d96f8ec Mon Sep 17 00:00:00 2001 From: Tomer Haskalovitch Date: Mon, 3 Aug 2026 01:04:32 +0300 Subject: [PATCH] mgr/nvmeof: dont strip dot from pool name in service creation Signed-off-by: Tomer Haskalovitch --- src/pybind/mgr/dashboard/services/nvmeof_client.py | 3 ++- src/pybind/mgr/orchestrator/module.py | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pybind/mgr/dashboard/services/nvmeof_client.py b/src/pybind/mgr/dashboard/services/nvmeof_client.py index afd555ef8cdc..be1f4f48e610 100644 --- a/src/pybind/mgr/dashboard/services/nvmeof_client.py +++ b/src/pybind/mgr/dashboard/services/nvmeof_client.py @@ -328,10 +328,11 @@ def get_gateway_locations(pool: str, group: str, hosts: Optional[List[str]] = No location = gw.get('location', '') # Extract hostname from gw-id (format: client.nvmeof.pool.group.hostname.xxx) + # pool might contains '.' if gw_id: parts = gw_id.split('.') if len(parts) >= 5: - hostname = parts[4] + hostname = parts[-2] if location: host_to_location[hostname] = location else: diff --git a/src/pybind/mgr/orchestrator/module.py b/src/pybind/mgr/orchestrator/module.py index 4192ef941026..83ba5f48cd99 100644 --- a/src/pybind/mgr/orchestrator/module.py +++ b/src/pybind/mgr/orchestrator/module.py @@ -2228,9 +2228,8 @@ Usage: nvmeof_pool_helper = NvmeofMetadataPoolHelper(self) nvmeof_pool_helper.create_pool_if_needed() - cleanpool = pool.lstrip('.') spec = NvmeofServiceSpec( - service_id=f'{cleanpool}.{group}' if group else cleanpool, + service_id=f'{pool}.{group}' if group else pool, pool=pool, group=group, placement=PlacementSpec.from_string(placement), -- 2.47.3