Commit Graph

12 Commits

Author SHA1 Message Date
Bence Romsics 27601f8eea Set trunk parent port as access port in ovs to avoid loop
A non-vlan-transparent trunk parent port (tpt) should only forward
untagged frames. Earlier it was configured to forward anything (trunk
mode in ovs). This patch changes the trunk mode to access mode and
sets the trunk parent's tag explicitly to 0.

Change-Id: I4bcfe53fe87d7c9218dd0db9d7224bb323709a21
Closes-Bug: #2048785
2024-01-24 14:42:13 +01:00
Miguel Lavalle 33de608f04 Avoid race condition when deleting trunk bridges
Prior to this change, trunk bridges are created by os-vif but deleted
by Neutron when the last vif is removed from it. This creates race
conditions in some use cases, like DPDK with vhostuserclient mode, when
VMs are rebooted. To avoid these races, Neutron will not delete trunk
bridges anymore. Their creation and deletion will be os-vif's
responsiblity. Since [1], Nova uses the os-vif version that contains
this functionality.

This patch also changes the trunk status change event. During a live
migration, when the trunk parent port has been bound to the destination
host (that means there is only one port binding associated) and the
status has changed to ACTIVE, the method triggers the subport binding
to the new host too. This is because there could be a race condition
between the subport binding, triggered by the OVS agent, and the parent
port binding, triggered by Nova. If when the OVS agent tries to bind the
subports, the parent port is still bound to the source host, the subport
binding remains in the source host too, instead of changing to the
destination.

This patch also reverts [2] and [3]. As commented in the previous
paragraph, this patch fixes the issue reported in LP#1997025. The trunk
port live migration with ML2/OVS must be fixed with this patch.

[1]https://review.opendev.org/c/openstack/nova/+/865031
[2]https://review.opendev.org/c/openstack/neutron/+/865295
[3]https://review.opendev.org/c/openstack/neutron/+/865424

Closes-Bug: #1869244
Closes-Bug: #1997025

Change-Id: I4e16357f3ff214fcf41e418982806c24088a2665
2022-11-17 10:39:30 +01:00
Brian Haley eaf990b2bc Fix pep8 E128 warnings in non-test code
Reduces E128 warnings by ~260 to just ~900,
no way we're getting rid of all of them at once (or ever).
Files under neutron/tests still have a ton of E128 warnings.

Change-Id: I9137150ccf129bf443e33428267cd4bc9c323b54
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
2019-03-12 21:22:33 +00:00
Inessa Vasilevskaya 7322bd6efb Make code follow log translation guideline
Since Pike log messages should not be translated.
This patch removes calls to i18n _LC, _LI, _LE, _LW from
logging logic throughout the code. Translators definition
from neutron._i18n is removed as well.
This patch also removes log translation verification from
ignore directive in tox.ini.

Change-Id: If9aa76fcf121c0e61a7c08088006c5873faee56e
2017-08-14 02:01:48 +00:00
Jakub Libosvar acfbd2d490 Move ovsdb_nested transaction to ovs_lib
The patch introduces new abstract method to the API abstract class. The
method is supposed to return a new Transaction object. Each
API object is capable of store one nested transaction which is returned
by context manager in case some transaction already exists.

As there are no projects in OpenStack that use inheritance directly from
API abstract class, it's safe to make this new create_transaction() abstract method.
Only projects that currenlty use ovsdb API are networking-ovn,
dragonflow and networking-l2gw. OVN and Dragonflow use only IDL
implementation and L2GW copies the code of API abstract class.

Closes-bug 1653517

Change-Id: I55dd417cae7ebbe0668ba5606949ce4ab045d251
2017-02-02 18:56:03 +00:00
Armando Migliaccio 4148102f73 Process OVS trunk bridges associated to VM deletes
If a VM is deleted while the OVS agent is down, upon
restart the OVS trunk bridge is deleted successfully
but the patch ports integration bridge side are left
behind.

This patch makes sure the bridge as well as its peers
are cleaned up.

Closes-bug: #1623708

Change-Id: I3f010755fdb6501753d20357ad2cd0d6c02cf22a
2016-09-26 23:11:22 +00:00
rossella 08f2af18f9 Handle add/remove subports events loss due to agent failures
Upon restart the agent reconciles the logical with the physical
state by removing/adding physical subports that are used to
be/are current present in the logical view.

This patch adds a functional test to demonstrate that there's
no need to handle the resync in the trunk driver, since the ovs
agent already takes care of it.

Change-Id: I164153c79313f2ae7a1fca0414736d5987656185
Partially-implements: blueprint vlan-aware-vms
Partial-bug: #1623708
2016-09-23 14:24:38 +00:00
Jenkins 1a51051836 Merge "Add release note for blueprint vlan-aware-vms" 2016-09-15 08:49:47 +00:00
Jakub Libosvar 68d13b92a5 trunk: Remove ovs constants from trunk utils module
Trunk utils should be driver agnostic.

Change-Id: Iec646b3b11b03687013db5af6afda3a21c03acb6
Closes-Bug: 1622632
2016-09-12 18:15:21 +00:00
Armando Migliaccio e1b2ac1e9e Add release note for blueprint vlan-aware-vms
Now that the bulk of the code is in place, and we are about
to see the finish line, it is time to prepare the release
notes for this feature.

This patch refines docstrings that recently went in and
makes sure the code is in sync with the agent's devref.

Implements: blueprint vlan-aware-vms

Change-Id: Idb9379046aeb07354a170a361da777140a2a028e
2016-09-09 13:30:22 -07:00
rossella 52300f285a OVSDBHandler for trunk ports
Handler processes the events passed by OVSDBMonitor
and reacts to events related to trunk ports, calling
to trunk manager to wire/unwire trunks and subports.

Co-Authored-By: Jakub Libosvar <libosvar@redhat.com>
Partially-implements: blueprint vlan-aware-vms
Change-Id: I97487e9d7647b4110a2cdd48d0f129340d59a40d
2016-09-08 22:29:37 +00:00
rossella 35ffbed6f7 TrunkManager for the OVS agent
This patch introduces the TrunkManager for the OVS
agent. This class is responsible for wiring the trunk
and the subports.

Partially-implements: blueprint vlan-aware-vms
Co-Authored-By: Jakub Libosvar <libosvar@redhat.com>

Change-Id: I498560798983177ce7b64e1a8f32f1a157558897
2016-08-24 02:52:17 -04:00