Fixed the member count check for LB PoolMember

Also fixes the stack state check when delete fails temporarily

Change-Id: I0a9adae954716d2cc47f1eb942401300814c3cbf
Closes-bug: #1400533
This commit is contained in:
Magesh GV 2015-01-05 12:51:20 +05:30
parent 588983f476
commit 5e65c3e2da
1 changed files with 2 additions and 2 deletions

View File

@ -234,7 +234,7 @@ class SimpleChainDriver(object):
for key in config_param_names or []:
if "PoolMemberIP" in key:
value = (member_ips[member_count]
if len(member_ips) >= member_count else '0')
if len(member_ips) > member_count else '0')
member_count = member_count + 1
config_param_values[key] = value
elif key == "Subnet":
@ -289,7 +289,7 @@ class SimpleChainDriver(object):
stack = heatclient.get(stack_id)
if stack.stack_status == 'DELETE_COMPLETE':
return
elif stack.stack_status == 'ERROR':
elif stack.stack_status == 'DELETE_FAILED':
heatclient.delete(stack_id)
except Exception:
LOG.exception(_("Service Chain Instance cleanup may not have "