]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: fix Zap.ensure_associated_raw() 61241/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Mon, 6 Jan 2025 16:12:22 +0000 (16:12 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Mon, 6 Jan 2025 18:52:02 +0000 (19:52 +0100)
When an OSD creation fails, ceph-volume can zaps unrelated
existing raw based OSD as part of the 'rollback step'.

Fixes: https://tracker.ceph.com/issues/69430
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
src/ceph-volume/ceph_volume/devices/lvm/zap.py
src/ceph-volume/ceph_volume/tests/devices/lvm/data_zap.py

index c278de43eb0a9e3601b3c2220d110aaf24a8df44..a6d82c7f0fa3e9df08c81aae85211c8b8a027291 100644 (file)
@@ -119,13 +119,12 @@ class Zap:
                     osd_uuid = details.get('osd_uuid')
                     break
 
-        for osd_uuid, details in raw_report.items():
+        for _, details in raw_report.items():
             device: str = details.get('device')
             if details.get('osd_uuid') == osd_uuid:
                 raw_devices.add(device)
 
         return list(raw_devices)
-        
 
     def find_associated_devices(self) -> List[api.Volume]:
         """From an ``osd_id`` and/or an ``osd_fsid``, filter out all the Logical Volumes (LVs) in the
index cca64e83ab0fdea5ae5762f6f3408ab2b9d7bb27..c971b7776ef405fdd3f729ba2907ddee0cb07dd3 100644 (file)
@@ -22,7 +22,7 @@ ceph_bluestore_tool_output = '''
         "whoami": "0"
     },
     "/dev/vdx": {
-        "osd_uuid": "d5a496bc-dcb9-4ad0-a12c-393d3200d2b6",
+        "osd_uuid": "d5a496bc-dcb9-4ad0-a12c-393d3200d2b7",
         "size": 214748364800,
         "btime": "2024-10-16T10:51:05.955279+0000",
         "description": "main",