Bug #59585
openmgr/cephadm: get_osd_uuid_map returns empty result when only_up is True
0%
Description
Looking at the code of get_osd_uuid_map [1] it does not make much sense to me for the case when only_up is True, as it will always return the empty result (we only add an osd to the result dict if only_up is False). This looks like a bug to me.
Note, it might not cause any (known) issues currently, I noticed it when troubleshooting an issue on a cluster of an older (16.2.5) version, where the `get_osd_uuid_map` is different and does not return the empty result, but it makes deploy_osd_daemons_for_existing_osds [2] skip all osds returned by `ceph-volume lvm list` due to this condition [3]. In a newer code this condition is never hit, not sure if it is exactly correct though.
[1] https://github.com/ceph/ceph/blob/adf13c82ebb75a132709aa0b0bbc1d4fef7643a7/src/pybind/mgr/cephadm/module.py#L2499
[2] https://github.com/ceph/ceph/blob/adf13c82ebb75a132709aa0b0bbc1d4fef7643a7/src/pybind/mgr/cephadm/services/osd.py#L100
[3] https://github.com/ceph/ceph/blob/adf13c82ebb75a132709aa0b0bbc1d4fef7643a7/src/pybind/mgr/cephadm/services/osd.py#L126
No data to display