From 6b44599f1adf70fb03ec1f673f3a2e3f8072276a Mon Sep 17 00:00:00 2001 From: Didier Gazen Date: Thu, 15 Jun 2023 15:57:24 +0200 Subject: [PATCH] mon/ConfigMonitor: update crush_location from osd entity 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 (cherry picked from commit 5df2a597a5b90ed492b2cbc3599f2cfdababeb12) --- src/mon/ConfigMonitor.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mon/ConfigMonitor.cc b/src/mon/ConfigMonitor.cc index 471aebf6dd6ba..e24ccbc1803d1 100644 --- a/src/mon/ConfigMonitor.cc +++ b/src/mon/ConfigMonitor.cc @@ -920,6 +920,7 @@ bool ConfigMonitor::refresh_config(MonSession *s) 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; -- 2.39.5