Fix the wrong device_owner when recreate LBaas listener
Currently, lbaas agent refresh loadbalancer based on the number of active listener, and will update the port with device_own='' if delete the last listener in loadbalancer. So the device_owner of the vip port of exist loadbalancer will never update to the correct one. This patch add port device_owner field to PUT to guarantee the field is 'neutron:LOADBALANCERV2'. Change-Id: I2de5800f4a6b06f98174ef42390f0e2c91bf0cfd Closes-Bug:#1692995
This commit is contained in:
parent
33f88e83ac
commit
7fa6bb9030
|
@ -169,6 +169,7 @@ class LoadBalancerCallbacks(object):
|
|||
|
||||
port['admin_state_up'] = True
|
||||
port[portbindings.HOST_ID] = host
|
||||
port['device_owner'] = constants.DEVICE_OWNER_LOADBALANCERV2
|
||||
self.plugin.db._core_plugin.update_port(
|
||||
context,
|
||||
port_id,
|
||||
|
|
Loading…
Reference in New Issue