]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
python-common: fix osdspec_affinity check 56084/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Tue, 5 Dec 2023 16:58:07 +0000 (17:58 +0100)
committerAdam King <adking@redhat.com>
Sun, 10 Mar 2024 19:11:05 +0000 (15:11 -0400)
commit157e93a812086cb2688586b03d3fd9261f6f9c37
treeb74cbb69c8fc70ef4ac96b0e450e3a378ba1386d
parent5bee1087985ebe9d721cdeeb2ee8183e5cf42d59
python-common: fix osdspec_affinity check

When no `service_id` is provided to service spec (osd) it results in
OSDs created with "osdspec_affinity" attribute set to a string
containing "None".

The DriveSelection class relies on the comparison of the actual
value of this attribute with the value of the service_id which has
the python type `None` in that case.

If any existing deployments were created without the service_id
attribute, we now have to support this case and make sure the check
won't filter out devices unexpectedly.

Fixes: https://tracker.ceph.com/issues/63729
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit c68b5af0fb639fccc89d26606c7924c6834bf606)
src/python-common/ceph/deployment/drive_selection/selector.py