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 <adking@redhat.com>
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' % (