]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr: override OSD hostname with CRUSH physical host in all metadata paths 69133/head
authorsenol.colak <senol.colak@sap.com>
Wed, 27 May 2026 16:47:20 +0000 (18:47 +0200)
committersenol.colak <senol.colak@sap.com>
Wed, 27 May 2026 20:43:27 +0000 (22:43 +0200)
commitdcd9c5bac5e2670efd726e1ae89bc264bd404671
tree0ebf562c7f34ce0ac2dcb07e982c46405c32aaf9
parent981cdf390129c4804466601c569ef46eda38367e
mgr: override OSD hostname with CRUSH physical host in all metadata paths

In containerized deployments (e.g. Rook), OSD daemons report the
pod/container hostname. The CRUSH map records the physical host.
This mismatch causes 'ceph device ls' to show pod names instead of
physical hosts, breaking host-based device correlation.

Fix by deriving the CRUSH host bucket name for each OSD and substituting
it as the canonical hostname in all three metadata paths:
- MetadataUpdate::finish (async mon metadata fetch, primary path)
- Mgr::load_all_metadata OSD bulk-load (startup/failover)
- DaemonServer::fetch_missing_metadata (via MetadataUpdate)

The override is a no-op when the OSD is absent from CRUSH or when the
OSD map is not yet available.

Fixes: https://tracker.ceph.com/issues/73080
Signed-off-by: senol.colak <senol.colak@sap.com>
src/mgr/DaemonServer.cc
src/mgr/Mgr.cc
src/mgr/Mgr.h