commit fa0fb2fe3d61de1cb871c48ee97053cf2fb5827a
Author: Stephen Finucane <email address hidden>
Date: Tue Jun 22 11:37:22 2021 +0100
libvirt: Always delegate OVS plug to os-vif
In change I11fb5d3ada7f27b39c183157ea73c8b72b4e672e, we started
delegating plugging of OVS ports to os-vif to work around a number of
bugs. However, this was only introduced for live migration. Plugging is
still handled by libvirt for spawn. This results in an odd situation,
whereby an interface of type 'bridge' will be use when creating the
instance initially, only for this to change to 'ethernet' on live
migration. Resolve this by *always* delegating plugging to os-vif. This
is achieved by consistently setting the 'delegate_create' attribute of
'nova.network.model.VIF' to 'True', which will later get transformed to
the 'create_port' attribute of the 'os_vif.objects.vif.VIFOpenVSwitch'
object(s) created in 'nova.network.os_vif_util._nova_to_osvif_vif_ovs'
and ultimately result in delegate port creation.
Note that we don't need to worry about making the setting of
'delegate_create' conditional on whether we're looking at an OVS port or
not: this will be handled by '_nova_to_osvif_vif_ovs'. We also don't
need to worry about unsetting this attribute before a live migration:
the 'delegate_create' attribute is always overridden as part of
'nova.objects.migrate_data.VIFMigrateData.get_dest_vif'.
Reviewed: https:/ /review. opendev. org/c/openstack /nova/+ /797428 /opendev. org/openstack/ nova/commit/ fa0fb2fe3d61de1 cb871c48ee97053 cf2fb5827a
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit fa0fb2fe3d61de1 cb871c48ee97053 cf2fb5827a
Author: Stephen Finucane <email address hidden>
Date: Tue Jun 22 11:37:22 2021 +0100
libvirt: Always delegate OVS plug to os-vif
In change I11fb5d3ada7f27 b39c183157ea73c 8b72b4e672e, we started network. model.VIF' to 'True', which will later get transformed to objects. vif.VIFOpenVSwi tch' os_vif_ util._nova_ to_osvif_ vif_ovs'
delegating plugging of OVS ports to os-vif to work around a number of
bugs. However, this was only introduced for live migration. Plugging is
still handled by libvirt for spawn. This results in an odd situation,
whereby an interface of type 'bridge' will be use when creating the
instance initially, only for this to change to 'ethernet' on live
migration. Resolve this by *always* delegating plugging to os-vif. This
is achieved by consistently setting the 'delegate_create' attribute of
'nova.
the 'create_port' attribute of the 'os_vif.
object(s) created in 'nova.network.
and ultimately result in delegate port creation.
Note that we don't need to worry about making the setting of create' conditional on whether we're looking at an OVS port or to_osvif_ vif_ovs' . We also don't objects. migrate_ data.VIFMigrate Data.get_ dest_vif' .
'delegate_
not: this will be handled by '_nova_
need to worry about unsetting this attribute before a live migration:
the 'delegate_create' attribute is always overridden as part of
'nova.
Change-Id: I014c5a81752f86 c6b99d19d769c42 f318e18e676
Signed-off-by: Stephen Finucane <email address hidden>
Related-Bug: #1734320
Related-Bug: #1815989