Skip to content

Commit

Permalink
LBaaS member status reflected incorrectly
Browse files Browse the repository at this point in the history
This fix checks if status of any requested member uve
is "ACTIVE", it generates the overall member status as
"ACTIVE".

Change-Id: I17409f70f81d9373f9e064b665196d4956c0c2ee
Closes-Bug: #1560741
  • Loading branch information
varun_lodaya committed Mar 23, 2016
1 parent b9381a0 commit 4ca81aa
Showing 1 changed file with 9 additions and 3 deletions.
Expand Up @@ -51,10 +51,16 @@ def _get_object_status(self, member):
except Exception:
member_stats = []

# In case of missing analytics, return ACTIVE
if not member_stats:
return constants.ACTIVE

for member_stat in member_stats:
if member_stat['uuid'] == member.uuid:
return member_stat['status']
return constants.ACTIVE
if member_stat['uuid'] == member.uuid and \
member_stat['status'] == 'ACTIVE':
return member_stat['status']

return constants.DOWN

def make_dict(self, member, fields=None):
res = {'id': member.uuid,
Expand Down

0 comments on commit 4ca81aa

Please sign in to comment.