]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/nvmeof: dont strip dot from pool name in service creation 70803/head
authorTomer Haskalovitch <tomer.haska@ibm.com>
Sun, 2 Aug 2026 22:04:32 +0000 (01:04 +0300)
committerTomer Haskalovitch <tomer.haska@ibm.com>
Tue, 4 Aug 2026 09:22:08 +0000 (12:22 +0300)
Signed-off-by: Tomer Haskalovitch <tomer.haska@ibm.com>
src/pybind/mgr/dashboard/services/nvmeof_client.py
src/pybind/mgr/orchestrator/module.py

index afd555ef8cdc4346b73ce42e215a9083b36adb1a..be1f4f48e610cdeb7c8ed1d1c1245922fcbfb00e 100644 (file)
@@ -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:
index 4192ef941026580ad74ccef6c55e0b9ee47217ba..83ba5f48cd99153cff76b4c16f0b1bcdfd2aecfb 100644 (file)
@@ -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),