[API] Fixed vip duplications on multi LBs
Change-Id: I00478f37d237c1697b988497c315143a03fd8697
This commit is contained in:
parent
07c05f229a
commit
4b4bd96553
|
@ -439,9 +439,10 @@ class GearmanClientThread(object):
|
|||
# time
|
||||
pass
|
||||
elif lb.status == 'BUILD':
|
||||
# Do nothing, stay in BUILD state until floating IP
|
||||
# assign finishes
|
||||
pass
|
||||
# Do nothing if a new device, stay in BUILD state until
|
||||
# floating IP assign finishes
|
||||
if len(lbs) > 1:
|
||||
lb.status = 'ACTIVE'
|
||||
else:
|
||||
lb.status = 'ACTIVE'
|
||||
lb.errmsg = None
|
||||
|
@ -452,6 +453,8 @@ class GearmanClientThread(object):
|
|||
# Shouldn't hit here, but just to be safe
|
||||
session.commit()
|
||||
return
|
||||
if device.status == 'BUILD' and len(lbs) > 1:
|
||||
device.status = 'ONLINE'
|
||||
device_name = device.name
|
||||
device_status = device.status
|
||||
session.commit()
|
||||
|
|
|
@ -31,10 +31,7 @@ LOG = logging.getLogger(__name__)
|
|||
|
||||
|
||||
def update_mnb(event_type, lbid, tenant_id):
|
||||
|
||||
if cfg.CONF['admin_api'].billing_enable:
|
||||
# Start a new thread
|
||||
eventlet.spawn_n(client_job, event_type, lbid, tenant_id)
|
||||
eventlet.spawn_n(client_job, event_type, lbid, tenant_id)
|
||||
|
||||
|
||||
def client_job(event_type, lbid, tenant_id):
|
||||
|
|
Loading…
Reference in New Issue