Hi,

Am 13.10.25 um 1:33 PM schrieb Robert Sander:

your commit 4941d09 https://github.com/ceph/ceph/ commit/4941d098e337f2b7ad8c6f7c90be3ae252d22f7b introduces this bug.

Please have a look at https://tracker.ceph.com/issues/72696

Especially the changes to src/ceph-volume/ceph_volume/util/device.py were causing this. After I reverted them I get the expected behaviour.

An alternative is to adapt the selector in the orchestrator as in this patch:

diff -ruN 
usr.orig/lib/python3.9/site-packages/ceph/deployment/drive_selection/selector.py
 usr/lib/python3.9/site-packages/ceph/deployment/drive_selection/selector.py
--- 
usr.orig/lib/python3.9/site-packages/ceph/deployment/drive_selection/selector.py
    2025-10-15 18:37:52.000000000 +0000
+++ 
usr/lib/python3.9/site-packages/ceph/deployment/drive_selection/selector.py2025-10-17
 08:10:54.840878772 +0000
@@ -78,7 +78,7 @@
         # If that is the case, we don't want to count the device
         # towards the limit as it will already be counted through the
         # existing daemons
-        non_ceph_devices = [d for d in devices if not d.ceph_device]
+        non_ceph_devices = [d for d in devices if not d.ceph_device_lvm]
if limit > 0 and (len(non_ceph_devices) + self.existing_daemons >= limit):
             logger.debug("Refuse to add {} due to limit policy of <{}>".format(
@@ -135,14 +135,14 @@
                 logger.debug('Ignoring disk {} as it is being 
replaced.'.format(disk.path))
                 continue
- if not disk.available and not disk.ceph_device:
+            if not disk.available and not disk.ceph_device_lvm:
                 logger.debug(
                     ("Ignoring disk {}. "
                      "Disk is unavailable due to {}".format(disk.path, 
disk.rejected_reasons))
                 )
                 continue
- if not disk.available and disk.ceph_device and disk.lvs:
+            if not disk.available and disk.ceph_device_lvm and disk.lvs:
                 other_osdspec_affinity = ''
                 for lv in disk.lvs:
                     if 'osdspec_affinity' in lv.keys():
diff -ruN usr.orig/lib/python3.9/site-packages/ceph/deployment/inventory.py 
usr/lib/python3.9/site-packages/ceph/deployment/inventory.py
--- usr.orig/lib/python3.9/site-packages/ceph/deployment/inventory.py   
2025-10-15 18:37:52.000000000 +0000
+++ usr/lib/python3.9/site-packages/ceph/deployment/inventory.py        
2025-10-17 08:11:31.894135171 +0000
@@ -44,7 +44,7 @@
class Device(object):
     report_fields = [
-        'ceph_device',
+        'ceph_device_lvm',
         'rejected_reasons',
         'available',
         'path',
@@ -67,7 +67,7 @@
                  device_id=None,  # type: Optional[str]
                  lsm_data=None,  # type: Optional[Dict[str, Dict[str, str]]]
                  created=None,  # type: Optional[datetime.datetime]
-                 ceph_device=None,  # type: Optional[bool]
+                 ceph_device_lvm=None,  # type: Optional[bool]
                  crush_device_class=None,  # type: Optional[str]
                  being_replaced=None,  # type: Optional[bool]
                  ):
@@ -80,7 +80,7 @@
         self.device_id = device_id
         self.lsm_data = lsm_data if lsm_data is not None else {}  # type: 
Dict[str, Dict[str, str]]
         self.created = created if created is not None else datetime_now()
-        self.ceph_device = ceph_device
+        self.ceph_device_lvm = ceph_device_lvm
         self.crush_device_class = crush_device_class
         self.being_replaced = being_replaced
@@ -131,7 +131,7 @@
             'path': self.path if self.path is not None else 'unknown',
             'lvs': self.lvs if self.lvs else 'None',
             'available': str(self.available),
-            'ceph_device': str(self.ceph_device),
+            'ceph_device_lvm': str(self.ceph_device_lvm),
             'crush_device_class': str(self.crush_device_class),
             'being_replaced': str(self.being_replaced)
         }
diff -ruN usr.orig/lib/python3.9/site-packages/ceph/tests/test_disk_selector.py 
usr/lib/python3.9/site-packages/ceph/tests/test_disk_selector.py
--- usr.orig/lib/python3.9/site-packages/ceph/tests/test_disk_selector.py       
2025-10-15 18:37:52.000000000 +0000
+++ usr/lib/python3.9/site-packages/ceph/tests/test_disk_selector.py    
2025-10-17 08:11:47.641244137 +0000
@@ -568,9 +568,9 @@
         # as a ceph_device. /dev/sdb and /dev/sdc are not being used
         # for OSDs yet. The limit will be set to 2 and the DriveSelection
         # is set to have 1 pre-existing device (corresponding to /dev/sda)
-        dev_a = Device('/dev/sda', ceph_device=True, available=False)
-        dev_b = Device('/dev/sdb', ceph_device=False, available=True)
-        dev_c = Device('/dev/sdc', ceph_device=False, available=True)
+        dev_a = Device('/dev/sda', ceph_device_lvm=True, available=False)
+        dev_b = Device('/dev/sdb', ceph_device_lvm=False, available=True)
+        dev_c = Device('/dev/sdc', ceph_device_lvm=False, available=True)
         all_devices: List[Device] = [dev_a, dev_b, dev_c]
         processed_devices: List[Device] = []
         filter = DeviceSelection(all=True, limit=2)


Regards
--
Robert Sander
Linux Consultant

Heinlein Consulting GmbH
Schwedter Str. 8/9b, 10119 Berlin

https://www.heinlein-support.de

Tel: +49 30 405051 - 0
Fax: +49 30 405051 - 19

Amtsgericht Berlin-Charlottenburg - HRB 220009 B
Geschäftsführer: Peer Heinlein - Sitz: Berlin
_______________________________________________
ceph-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to