]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: trigger host metadata refrsh when taking host out of maintenance 60614/head
authorAdam King <adking@redhat.com>
Mon, 4 Nov 2024 19:13:02 +0000 (14:13 -0500)
committerAdam King <adking@redhat.com>
Tue, 1 Apr 2025 18:44:32 +0000 (14:44 -0400)
If a host was in maintenance mode, we should make sure to check
all of the host information again once it's taken out even if
it hasn't been long enough for the daemon/device/facts etc. cache
to timeout. Some users may make changes to things like the node's
hardware or OS during maintenance mode that we should make sure to
pick up as soon as possible

Signed-off-by: Adam King <adking@redhat.com>
src/pybind/mgr/cephadm/module.py

index b27b2cd3ee0f7f8e6bd7bd0eeaffa6dd6462e402..1a5389d026083707205548227b8eb6123896571c 100644 (file)
@@ -2300,6 +2300,10 @@ Then run the following:
         tgt_host['status'] = ""
         self.inventory._inventory[hostname] = tgt_host
         self.inventory.save()
+        # make sure we refresh state for this host now that it's out
+        # of maintenance mode. Maintenance mode is a time where users
+        # could have theoretically made a lot of changes to the host.
+        self._invalidate_all_host_metadata_and_kick_serve(hostname)
 
         self.set_maintenance_healthcheck()