From: Adam King Date: Mon, 4 Nov 2024 19:07:01 +0000 (-0500) Subject: mgr/cephadm: add func to invalidate all host metadata and kick serve loop X-Git-Tag: v20.3.0~193^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=41c91e4e0be55d7b23881fcda79f01f634dae1ab;p=ceph.git 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 --- 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]: