]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/cephadm: Don't skip OSDs with non-empty osdspec_affinity 69247/head
authorRedouane Kachach <rkachach@ibm.com>
Tue, 2 Jun 2026 14:33:17 +0000 (16:33 +0200)
committerRedouane Kachach <rkachach@ibm.com>
Tue, 2 Jun 2026 14:33:17 +0000 (16:33 +0200)
commit6260b33f1d226b6925f6242f5eeae5568619b411
treee81046400faa716f63d6f5bfb82544c6ba5cea83
parent00a7d4aaea26109db7876e92bc4a39e39b4a1d3b
mgr/cephadm: Don't skip OSDs with non-empty osdspec_affinity

`ceph cephadm osd activate` calls `deploy_osd_daemons_for_existing_osds`
with a synthetic DriveGroupSpec where service_id=''. Commit fbe3a053
introduced an unconditional osdspec_affinity filter:

    if osd['tags']['ceph.osdspec_affinity'] != spec.service_id:
        continue

The fix is to only enforce the affinity check when spec.service_id is
non-empty. An empty service_id means the caller is osd activate, which
should adopt any existing OSD regardless of its affinity tag.

Fixes: https://tracker.ceph.com/issues/76979
Signed-off-by: Redouane Kachach <rkachach@ibm.com>
src/pybind/mgr/cephadm/services/osd.py