Merge pull request #69849 from adk3798/cephadm-delete-config-deps

mgr/cephadm: clear daemon_config_deps entry for removed daemons

Reviewed-by: Shweta Bhosale <Shweta.Bhosale1@ibm.com>
This commit is contained in:
Redouane Kachach 2026-07-06 12:26:49 +02:00 committed by GitHub
commit ae0cfd0d43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -854,6 +854,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']),
@ -1572,6 +1576,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:
"""