DVR:Pro-active router creation with live migration
Today DVR routers are created after a dvr service port is
seen on a given node. But in the case of instance live
migration, the creation of l3 routed networks on the
destination node is delayed since we react to the event.
This patch tries to proactively create routers on the
destination node based on the portbinding profile info
updated by the nova when the instance is on a pre-migration
state.
Nova calls setup_network_on_host during the pre-migration
phase and we update the portbinding profile dict with
an attribute 'migrating_to' as shown below
port:{'binding:profile':{'migrating_to': 'host'}}
where 'host' points to the 'destination' of the port.
L3 plugin will verify the migration profile for the port on
any port update and then take action to create routers in the
respective agents if routers have not been created.
If the live migration fails or if reverted, then the port
binding profile attribute 'migrating_to' will be cleared from
the port profile. In this case, the router and the fip namespace
may be created on the destination node, but since the VM did
not land on the destination node, it would not cause any issues,
since the traffic will still be flowing out from the origination
node, except for the existence of the router and fip namespace.
For some reason if the creation of the router namespace and fip
namespace fails, then the live migration may still proceed as
it is now and the agent will create the router namespace and fip
namespace reactively.
The case were we report status back to Nova and Nova reacting
to the setup_networks_on_host status will be handled in the
upcoming release.
This patch should not affect any upgrades with respect to the
agent or server.
Reviewed: https:/ /review. openstack. org/275420 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=f0bdb798fa1 4b7bd5649d98789 e71803127dd9f7
Committed: https:/
Submitter: Jenkins
Branch: master
commit f0bdb798fa14b7b d5649d98789e718 03127dd9f7
Author: Swaminathan Vasudevan <email address hidden>
Date: Tue Feb 2 12:44:16 2016 -0800
DVR:Pro-active router creation with live migration
Today DVR routers are created after a dvr service port is
seen on a given node. But in the case of instance live
migration, the creation of l3 routed networks on the
destination node is delayed since we react to the event.
This patch tries to proactively create routers on the
destination node based on the portbinding profile info
updated by the nova when the instance is on a pre-migration
state.
Nova calls setup_network_ on_host during the pre-migration
phase and we update the portbinding profile dict with
an attribute 'migrating_to' as shown below
port: {'binding: profile' :{'migrating_ to': 'host'}}
where 'host' points to the 'destination' of the port.
L3 plugin will verify the migration profile for the port on
any port update and then take action to create routers in the
respective agents if routers have not been created.
If the live migration fails or if reverted, then the port
binding profile attribute 'migrating_to' will be cleared from
the port profile. In this case, the router and the fip namespace
may be created on the destination node, but since the VM did
not land on the destination node, it would not cause any issues,
since the traffic will still be flowing out from the origination
node, except for the existence of the router and fip namespace.
For some reason if the creation of the router namespace and fip
namespace fails, then the live migration may still proceed as
it is now and the agent will create the router namespace and fip
namespace reactively.
The case were we report status back to Nova and Nova reacting on_host status will be handled in the
to the setup_networks_
upcoming release.
This patch should not affect any upgrades with respect to the
agent or server.
Change-Id: Ibb62f012333cfd fd468bafdc0b450 1aa46b4b54d
Related-Bug: #1456073