In case when physical bridge is removed and created again it
is initialized by neutron-ovs-agent.
But if agent has enabled distributed routing, dvr related
flows wasn't configured again and that lead to connectivity issues
in case of DVR routers.
This patch fixes it by adding configuration of dvr related flows
if distributed routing is enabled in agent's configuration.
It also adds reset list of phys_brs in dvr_agent. Without that there
were different objects used in ovs agent and dvr_agent classes thus
e.g. 2 various cookie ids were set on flows in physical bridge.
This was also the same issue in case when openvswitch was restarted and
all bridges were reconfigured.
Now in such case there is correctly new cookie_id configured for all
Prior to this patch OVN did not validate any extra DHCP option passed
to the port leading to confusion because the user of the API could just
input any value and OVN would accept it (returning 200) but ignoring the
This patch now adds such validations on port creation and update.
This patch also sync with the latest supported DHCP options from OVN and
create a map between the different names and option codes to their OVN
Signed-off-by: Lucas Alvares Gomes <email@example.com>
ML2 OVN Mechanism driver wipes all the nodes from ovn_hash_ring table on
initialization. The DB sync untility inherits from the mechanism driver
calling the cleanup whenever sync util is executed. This leads to nodes
being deleted while neutron-server is typically running, causing serious
issues to neutron-server until it is restarted.
This patch overrides the clean method to no-op.
Signed-off-by: Jakub Libosvar <firstname.lastname@example.org>
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems
Update Sphinx version as well.
Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.
Set openstackdocs_auto_name to use 'project' as name.
Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.
Remove docs requirements from lower-constraints, they are not needed
during install or test but only for docs building.
openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.
The periodic job running ovsdbapp master started failing after the
ovsdbapp custom indexing patch merged. There were just some things
that needed to be mocked out.
In the patch  we changed definition of the abstract method
"plug" in the LinuxInterfaceDriver class.
That broke e.g. 3rd-party drivers which still don't accept this
new parameter called "link_up" in the plug_new method.
So this patch fixes this to make such legacy drivers to be still working
with the new base interface driver class.
This commit also marks such definition of the plug_new method as
deprecated. Possibility of using it without accepting link_up parameter
will be removed in the "W" release of the OpenStack.
Two places needed to pass the _plugin_context like the mech driver
already does since PortContext has no session. There was also a
place where a port object was passed instead of a port id.
Allow the subscriber to know the deleted security group name. It can
help some downstream callback utilization to use the deleted sg name for
After I876919dfc1fa0ae36bd99e3d760e38d207ee6ef3, two test classes
that inherit from both neutron's oslotest-based base classes and
ovsdbapp's unittest-based base class would fail due to
mock.patch.stopall being called twice. This appears to be because
of some special handling in oslotest addCleanup that checks a
private _cleanups variable before adding a cleanup to stopall.
Changing the order of the imports so that neutron can register its
cleanups first seems to fix the issue.
Back in Newton, patch  added to the agents possibility to report in
the heartbeat messages if hybrid plug of the ports is required or not.
Usage of "firewall_driver" option by mechanism drivers (so on the
server's side) was kept just for backward compatibility.
But as we are now about 4 years from the  I think it should be safe
to do small cleaning, remove usage of this option in the neutron server
and not confuse users where this config option has to be set and why.
Test test_handle_trunk_remove_trunk_manager_failure is trying
to connect to tcp:127.0.0.1:6640. This behaviour can be visible
by netcat while test is running. As this is unit test, it should
use mock, not real ovsdb. This patch is fixing this.
$ nc -l -p 6640
In case when neutron-ovs-agent will notice that any of physical
bridges was "re-created", we should also ensure that stale Open
Flow rules (with old cookie id) are cleaned.
This patch is doing exactly that.
Optimize the following methods:
Those methods, using the "QosPolicy_XXXX_Binding" OVO interface, were
retrieving all objects with a certain policy ID and then returning
only the ID of the _XXXX_ object. That means to retrieve a full
register list from the DB, then converted them to OVOs and extract
only the _XXXX_ ID.
This patch retrieves only the _XXXX_ object IDs from the DB and
returns the list, without the OVO conversion.
In hacking 2.0 or later, local-check-factory was removed as it is not
compatible with flake8 3.x and it is advised to use flake8's local
plugins . neutron-lib provided a factory to register common hacking
rules, but it no longer works with hacking 2, so we need to define rules
defined in neutron-lib as flake8 local check plugin  explicitly.
This needs to be done in each neutron related project, so it is the
downside of the migration to hacking 2.x (I explored a way to continue
to use the factory but failed to find a good way to achieve this) but
I believe it is good to migrate the newer libraries.
* flake8ext decorator in neutron/hacking/checks.py is also replaced with
hacking.core.flake8ext to avoid the copy-and-paste code.
* neutron-lib dependency is updated as neutron-lib 2.3 added hacking 3 support.
* Python modules related to coding style checks (listed in blacklist.txt in
openstack/requirements repo) are dropped from lower-constraints.txt
as they are not actually used in tests (other than pep8).
* HackingDocTestCase is now converted into normal test cases.
HackingDocTestCase depends on the internal of hacking and pycodestyle
so it looks better to use normal style of writing tests.
For now OVS doesn't support compilation of kernel module
for kernels newer than 5.5 .
Recently Fedora 31 upgraded the kernel to 5.6.8 and that is
why the periodic jobs started to fail .
By default we enabled OVS module compilation because Ubuntu
Bionic one doesn't have support for Openflow Meter actions.
In case flag OVN_BUILD_MODULES is set to True and kernel is
newer than 5.5 lets skip the module compilation with proper log.
We override ovsdbapp's Backend class to change from using a class
variable for the ovsdb_connection to using an instance variable.
This means we have to override several different methods/properties.
This could be simplified in ovsdbapp by making ovsdb_connection a
property, which in ovsdbapp access a class variable, and in neutron
it is overridden to to store on the instance, so there would be
less to override.
ovsdbapp is adding user-definable indexed columns so things like
lookups by name will be faster. Due to the way it is architected,
the place to generate the indexes would be just before the
connection starts. Since methods like start_connection are
classmethods in ovsdbapp, and instance methods in neutron, this is
hard to do cleanly w/o ovsdb_connection being a property. Without
this change, neutron would fail if that property was defined. With
the change, it should pass with both old and new code.
If other openstack project uses Neutron with OVN
(as enable_plugin ... neutron) and doesn't specify
OVN_BRANCH and OVS_BRANCH variables in configuration
it will use master branch of those two repositories.
Master branch servers for OVN testing and aligning OVN
Neutron driver with new features.
For now we don't have voting OVN master CI job, to ensure that
everything is fine with it, so we should default OVN for other
projects to the latest stable version that we know works properly.
This new synthetic field is linked to a "QosPolicyFloatingIPBinding"
register. This binding register will bind a QoS policy and a
Now is possible to provide this field in the create/update input
parameters. If provided, the "FloatingIP" OVO will create/delete the
The OVO takes this parameter from the DB object. When the DB object
is retrieved, the QoS policy binding register is retrieved too due
to a backref link in the "QosFIPPolicyBinding" DB model to the
"FloatingIP" DB model.