]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
python-common: fix osdspec_affinity check 54786/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Tue, 5 Dec 2023 16:58:07 +0000 (17:58 +0100)
committerGuillaume Abrioux <gabrioux@ibm.com>
Tue, 5 Dec 2023 16:58:07 +0000 (17:58 +0100)
commitc68b5af0fb639fccc89d26606c7924c6834bf606
treec40d415231e1c211ffc554826d04680a6887f090
parentf64ad4406c4f44653fafb46c0655b31b9b16c3b1
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>
src/python-common/ceph/deployment/drive_selection/selector.py