Merge "NSX|P: Fix octavia operating status" into stable/train

This commit is contained in:
Zuul 2020-11-04 15:48:32 +00:00 committed by Gerrit Code Review
commit a5d9b64c0e
2 changed files with 7 additions and 5 deletions

View File

@ -127,13 +127,16 @@ LISTENERS = 'listeners'
POOLS = 'pools' POOLS = 'pools'
MEMBERS = 'members' MEMBERS = 'members'
# Operating statuses
ONLINE = 'ONLINE' ONLINE = 'ONLINE'
OFFLINE = 'OFFLINE' OFFLINE = 'OFFLINE'
DEGRADED = 'DEGRADED' DEGRADED = 'DEGRADED'
ENABLED = 'ENABLED'
DISABLED = 'DISABLED'
ACTIVE = 'ACTIVE' ACTIVE = 'ACTIVE'
ERROR = 'ERROR' ERROR = 'ERROR'
UNKNOWN = 'UNKNOWN' UNKNOWN = 'UNKNOWN'
# Admin states
ENABLED = 'ENABLED'
DISABLED = 'DISABLED'
VMWARE_LB_VIP_OWNER = 'vmware-lb-vip' VMWARE_LB_VIP_OWNER = 'vmware-lb-vip'

View File

@ -303,10 +303,9 @@ def _nsx_status_to_lb_status(nsx_status):
'NO_STANDBY']: 'NO_STANDBY']:
return lb_const.ONLINE return lb_const.ONLINE
# Statuses that are considered OFFLINE: # Statuses that are considered OFFLINE:
if nsx_status.upper() in ['PRIMARY_DOWN', 'DETACHED', 'DOWN', 'ERROR']: if nsx_status.upper() in ['PRIMARY_DOWN', 'DETACHED', 'DOWN', 'ERROR',
'DISABLED']:
return lb_const.OFFLINE return lb_const.OFFLINE
if nsx_status.upper() == 'DISABLED':
return lb_const.DISABLED
# default fallback # default fallback
LOG.debug("NSX LB status %s - interpreted as ONLINE", nsx_status) LOG.debug("NSX LB status %s - interpreted as ONLINE", nsx_status)