]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
python-common/drive_selection: keep existing-OSD devices past limit 68858/head
authorRaimund Sacherer <rsachere@redhat.com>
Tue, 12 May 2026 09:07:30 +0000 (11:07 +0200)
committerRaimund Sacherer <rsachere@redhat.com>
Tue, 12 May 2026 14:35:08 +0000 (16:35 +0200)
commita75d42acb06eb910484f7ad0e5679bf4ebf32fb0
treecafab2b83351442577e87d5248d86e9ff3d14ccf
parent5f8a4de52a87a7a0aebaf787f86fa922673ba1f9
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>
src/python-common/ceph/deployment/drive_selection/selector.py
src/python-common/ceph/tests/test_disk_selector.py