]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/ConfigMonitor: update crush_location from osd entity 52468/head
authorDidier Gazen <didier.gazen@aero.obs-mip.fr>
Thu, 15 Jun 2023 13:57:24 +0000 (15:57 +0200)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Sat, 15 Jul 2023 07:36:39 +0000 (14:36 +0700)
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)

src/mon/ConfigMonitor.cc

index c82a8417ab0eede45ee402e8c997c9f9a5c31729..1dd3747e73d0e808c22d0dcad55b720846d81960 100644 (file)
@@ -932,6 +932,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;