Skip to content

Commit

Permalink
OPENSTACK-2959: we need to update port before build service object
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zhang-shengping committed Feb 28, 2024
1 parent c292dfa commit 91ce3dc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions f5lbaasdriver/v2/bigip/driver_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -810,16 +810,17 @@ def refresh(self, context, body):
try:
agent, device = self._schedule_agent_and_device(
context, loadbalancer, device_id=device_id)

if device_id:
self.migrate_vipport(context, agent, device, loadbalancer)

# NOTE(qzhao): Call agent to rebuild LB.
service = self._create_service(context, loadbalancer, agent)

device["rm_selfip_port"] = rm_selfip_port
service["device"] = device
agent_host = agent['host']

if device_id:
self.migrate_vipport(context, agent, device, loadbalancer)

if rebuild_all:
self._allocate_acl_groups(context, service)
driver.agent_rpc.rebuild_loadbalancer(
Expand Down

0 comments on commit 91ce3dc

Please sign in to comment.