For osd entities, crush_location needs to refer to osd's parent
(host) so that 'ceph config set' using osd/host mask can work.
Fixes: https://tracker.ceph.com/issues/48750
Signed-off-by: Didier Gazen <didier.gazen@aero.obs-mip.fr>
(cherry picked from commit
5df2a597a5b90ed492b2cbc3599f2cfdababeb12)
string device_class;
if (s->name.is_osd()) {
+ osdmap.crush->get_full_location(s->entity_name.to_str(), &crush_location);
const char *c = osdmap.crush->get_item_class(s->name.num());
if (c) {
device_class = c;