From: Adam King Date: Tue, 30 Jun 2026 19:31:20 +0000 (-0400) Subject: mgr/cephadm: clear daemon_config_deps entry for removed daemons X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f574381b1c56fb16862fee1e32ac4437ed56ee4e;p=ceph.git mgr/cephadm: clear daemon_config_deps entry for removed daemons This covers both removing them actively from now on when removing daemons from the HostCache and also not loading entries like this back in next time they are loaded when a user upgrades to a version with this patch Fixes: https://tracker.ceph.com/issues/77839 Signed-off-by: Adam King (cherry picked from commit 7272236d1088b0f2a49f5b18811e6ab4c552f3a8) --- diff --git a/src/pybind/mgr/cephadm/inventory.py b/src/pybind/mgr/cephadm/inventory.py index 22ffb4d9e70d..7dd5d1863b72 100644 --- a/src/pybind/mgr/cephadm/inventory.py +++ b/src/pybind/mgr/cephadm/inventory.py @@ -849,6 +849,10 @@ class HostCache(): self.osdspec_last_applied[host][name] = str_to_datetime(ts) for name, d in j.get('daemon_config_deps', {}).items(): + # drop potential leftover daemon_config_deps entries + # assume if we didn't find a daemon entry, it's a leftover + if name not in self.daemons.get(host, {}): + continue self.daemon_config_deps[host][name] = { 'deps': d.get('deps', []), 'last_config': str_to_datetime(d['last_config']), @@ -1567,6 +1571,9 @@ class HostCache(): if host in self.daemons: if name in self.daemons[host]: del self.daemons[host][name] + if host in self.daemon_config_deps: + if name in self.daemon_config_deps[host]: + del self.daemon_config_deps[host][name] def daemon_cache_filled(self) -> bool: """