]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
python-common/drive_selection: keep existing-OSD devices past limit 69093/head
authorRaimund Sacherer <rsachere@redhat.com>
Tue, 12 May 2026 09:07:30 +0000 (11:07 +0200)
committerGuillaume Abrioux <gabrioux@ibm.com>
Tue, 26 May 2026 09:24:51 +0000 (09:24 +0000)
commit8ab2db3d755fb07e476ad5c4a3d448c4df3fecea
treebe8b5a32c5957001ee455ff4a799dde1da4f0af4
parentcdc06171ff97e595aa40012aeae8329fd634b049
python-common/drive_selection: keep existing-OSD devices past limit

assign_devices() breaks out of disk iteration on the first hit from
_limit_reached(). When that happens, any later existing-OSD device
for the current spec is silently dropped from the selection, and
ceph-volume's lvm batch loses sight of it.

Only break when the candidate is not an existing OSD for this
service_id. Existing-for-this-spec devices continue to be added past
the limit; they are already accounted for through existing_daemons.

Complements d3f1a0e1c0b ("fix limit with existing devices", 2023),
which excluded ceph devices from the limit count. That fix prevents
the break from firing in most cases; this one keeps the iteration
useful when it does fire anyway.

Needs review: interaction across spec shapes (with/without explicit
limit:, with/without existing_daemons) should be looked at.

Fixes: https://tracker.ceph.com/issues/76522
Signed-off-by: Raimund Sacherer <rsachere@redhat.com>
(cherry picked from commit a75d42acb06eb910484f7ad0e5679bf4ebf32fb0)
src/python-common/ceph/deployment/drive_selection/selector.py
src/python-common/ceph/tests/test_disk_selector.py