Service group drivers forced_down flag utilization

Actual usage of the forced_down flag in case of usage of is_up() method. If
forced_down flag is set (i.e. have value True) than is_up unconditionally
return False - means service is down.

Partially-Implements: blueprint mark-host-down

Change-Id: Ia8ae49c5a38b217f19632a1ac40343ec9e608796
This commit is contained in:
Roman Dobosz
2015-07-13 21:34:01 +02:00
parent 8ad8701c1f
commit e6c5b4bcf7
2 changed files with 74 additions and 0 deletions

View File

@@ -88,6 +88,9 @@ class API(object):
"""Check if the given member is up."""
# NOTE(johngarbutt) no logging in this method,
# so this doesn't slow down the scheduler
if member.get('forced_down'):
return False
return self._driver.is_up(member)
def get_all(self, group_id):