]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: add func to invalidate all host metadata and kick serve loop
authorAdam King <adking@redhat.com>
Mon, 4 Nov 2024 19:07:01 +0000 (14:07 -0500)
committerAdam King <adking@redhat.com>
Tue, 1 Apr 2025 18:44:32 +0000 (14:44 -0400)
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 <adking@redhat.com>
src/pybind/mgr/cephadm/module.py

index 4f01b78903d020e98bec949a401fcecc7cc10eb2..b27b2cd3ee0f7f8e6bd7bd0eeaffa6dd6462e402 100644 (file)
@@ -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]: