From 41c91e4e0be55d7b23881fcda79f01f634dae1ab Mon Sep 17 00:00:00 2001 From: Adam King Date: Mon, 4 Nov 2024 14:07:01 -0500 Subject: [PATCH] mgr/cephadm: add func to invalidate all host metadata and kick serve loop We already had one of these specifically for daemons. This commit just adds the same but for all types of host metadata. Currently the intended use is to call this when taking a host out of maintenace mode as it's not just the daemons that could have been modified while the host was in maintenance mode. Signed-off-by: Adam King --- src/pybind/mgr/cephadm/module.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 4f01b78903d..b27b2cd3ee0 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -2383,6 +2383,11 @@ Then run the following: self._kick_serve_loop() + def _invalidate_all_host_metadata_and_kick_serve(self, hostname: str) -> None: + # invalidates all metadata for a given host and kicks serve loop + self.cache.refresh_all_host_info(hostname) + self._kick_serve_loop() + @handle_orch_error def describe_service(self, service_type: Optional[str] = None, service_name: Optional[str] = None, refresh: bool = False) -> List[orchestrator.ServiceDescription]: -- 2.47.3