]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: remove host from offline_hosts list when removing host 49856/head
authorAdam King <adking@redhat.com>
Fri, 21 Oct 2022 20:54:31 +0000 (16:54 -0400)
committerAdam King <adking@redhat.com>
Fri, 17 Feb 2023 15:45:51 +0000 (10:45 -0500)
Otherwise, it could remain in the list and cephadm could think
there is an offline host in the cluster when said host has
actually already been removed.

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit beea26fc267c338ac4ed58a39535f017f892ea85)

src/pybind/mgr/cephadm/module.py

index bd02b3527ae0748d3664fe4b1eca7eba983e4105..e42903de24247060c404e7074fdaa71f87c06a3c 100644 (file)
@@ -1536,6 +1536,7 @@ Then run the following:
         self.inventory.rm_host(host)
         self.cache.rm_host(host)
         self.ssh.reset_con(host)
+        self.offline_hosts_remove(host)  # if host was in offline host list, we should remove it now.
         self.event.set()  # refresh stray health check
         self.log.info('Removed host %s' % host)
         return "Removed {} host '{}'".format('offline' if offline else '', host)