Skip to content

Commit 91ce3dc

Browse files
OPENSTACK-2959: we need to update port before build service object
when migrate lb tree from A device to B device, agent use network information from service object. so when need to update network first, then build network info into service object. then the agent can use new network (physical info, vlan) from service object.
1 parent c292dfa commit 91ce3dc

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

f5lbaasdriver/v2/bigip/driver_v2.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -810,16 +810,17 @@ def refresh(self, context, body):
810810
try:
811811
agent, device = self._schedule_agent_and_device(
812812
context, loadbalancer, device_id=device_id)
813+
814+
if device_id:
815+
self.migrate_vipport(context, agent, device, loadbalancer)
816+
813817
# NOTE(qzhao): Call agent to rebuild LB.
814818
service = self._create_service(context, loadbalancer, agent)
815819

816820
device["rm_selfip_port"] = rm_selfip_port
817821
service["device"] = device
818822
agent_host = agent['host']
819823

820-
if device_id:
821-
self.migrate_vipport(context, agent, device, loadbalancer)
822-
823824
if rebuild_all:
824825
self._allocate_acl_groups(context, service)
825826
driver.agent_rpc.rebuild_loadbalancer(

0 commit comments

Comments
 (0)