From: Adam King Date: Mon, 19 Jul 2021 16:07:39 +0000 (-0400) Subject: mgr/cephadm: stop removal of daemons from offline hosts X-Git-Tag: v16.2.6~54^2~23 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5f339b2c9a39ccf7ca4172b7b93570e3a33a9d58;p=ceph.git mgr/cephadm: stop removal of daemons from offline hosts This check was only looking for the status of the host and not looking at the offline_hosts set so it wasn't actually stopping daemons from being removed from offline hosts Signed-off-by: Adam King (cherry picked from commit 7c138ed52d806726f5e0a1548d958af0f95813e8) --- diff --git a/src/pybind/mgr/cephadm/serve.py b/src/pybind/mgr/cephadm/serve.py index 420b560fc132..b36d24c991d8 100644 --- a/src/pybind/mgr/cephadm/serve.py +++ b/src/pybind/mgr/cephadm/serve.py @@ -692,7 +692,7 @@ class CephadmServe: try: all_slots, slots_to_add, daemons_to_remove = ha.place() daemons_to_remove = [d for d in daemons_to_remove if (d.hostname and self.mgr.inventory._inventory[d.hostname].get( - 'status', '').lower() not in ['maintenance', 'offline'])] + 'status', '').lower() not in ['maintenance', 'offline'] and d.hostname not in self.mgr.offline_hosts)] self.log.debug('Add %s, remove %s' % (slots_to_add, daemons_to_remove)) except OrchestratorError as e: self.log.error('Failed to apply %s spec %s: %s' % (