This patch adds support for configuring a local (in-node) OVN cluster
to do the actions that were being done by the kernel networking.
This way, things like ovs-dpdk or HWOL could be supported.
This also includes adaptation to the tox.ini coverage so that
test files are not considered. This was making coveraged artificially
higher that it was, so this patch is also adjusting the minimun
coverage accordingly.
Missing items to be handled in follow up patch sets:
- Documentation
- Support for IPv6
- Support for BFD
- Support for vlan provider networks
Change-Id: Ieff19d88a22d7267bd58f8d1d4ecbcdc668c6bfb
Initial support for devstack plugin, with default configuration
for the SB DB driver
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Change-Id: If806802fe65f852f643b85557c4c88973fa96dea
Add file to the reno documentation build to show release notes for
stable/2023.2.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.2.
Sem-Ver: feature
Change-Id: Iee1ea4f4cc78c7de1cda0369e892f44b1ea69269
The requested-chassis information is only added by neutron
for "" port types. The virtual ports chassis is decided by OVN
not by neutron, and neutron only update that information in the
periodic maintenance task.
As part of [1] information about the virtual port chassis is being
added to the external_ids, as well as for "" ports. This patch is
adapting the NB DB driver to consume this new source of information
and being able to expose those ports when OVN associates them to a
node.
Depends-On: https://review.opendev.org/c/openstack/neutron/+/882705
Closes-Bug: #2020157
[1] https://review.opendev.org/c/openstack/neutron/+/882705
Change-Id: I9abf987004370d0c3ec6a152bb28ab450a9af2c2
There is a lot of logs from pyroute2 through privsep. This change
ensures the DEBUG option does not change them to DEBUG too so that
the ovn-bgp-agent logs are not that chatty and do not include
uneeded exceptions at the lower levels that are part of the normal
execution path (such as adding an IP already added)
Change-Id: I5627a5d546740e8797edb5c2c3a6fc6b6598699c
If the bridge mappings are changed to a wrong value, we should not
expose the previous IPs. This is needed to ensure the traffic is
only exposed in the right node.
Closes-Bug: #2025057
Change-Id: I5d56801ae87d2640d9671aaef65bc94228c60f52
In the test ``test_get_interface_address``, when the interface is
created, the MAC address is defined too. This random MAC address is
compared with the result from the tested method.
Change-Id: I20820a6a2351e2eded5e352d2d82fbad1edf3080
If provider network are recreated the vlan devices created
for them are leaked. With this patch we ensure those devices
are deleted as part of the resync action
Closes-Bug: #2020653
Change-Id: I57775fdeaa3ea6dfa35c0ca44b226fa8b44e0cd3
Add periodic weekly and experimental queues to ovn-bgp-agent
to increase the coverage and have early warning for issues
with oslo master.
Change openstack-python3-zed-jobs to openstack-python3-jobs-neutron.
Change-Id: I10471cb663aea743dc5f4dd27e1d0cac7ea60a69
There was a few suggestions to improve the code that were not
included in the main patch sets. Adding them here
Change-Id: I3ea3012e7dc5196c1d35b6265bb7c50ffa576c1e
This ensures the FIPs associated to cr-lrps are processed as part
of the cr-lrp chassis binding event
Closes-Bug: #2024196
Change-Id: I5bfa99c8ee7decf7ff50a2a7de87362eed9eb7a0
This patch continues with the work on avoiding NDB usage in favor
of IPRoute
Partial-Bug: #2022357
Change-Id: I1a8e1a8ca3c82d3cc5a4a10dbccd28cbe14f64c7
This patch continues with the work on avoiding NDB usage in favor
of IPRoute
Partial-Bug: #2022357
Change-Id: Id94c0d911ab9bb320a88b87e834ecf2fc423e041
This patch add the following new privileged methods implementations:
* rule_create
* rule_delete
These new method use pyroute2 IPRoute class, replacing the use of the
NDB class.
Partial-Bug: #2022357
Change-Id: I7cb004b7523d957b3849621a0387288e758b8520
This patch add the following new privileged methods implementations:
* route_create
* route_delete
* add_unreachable_route
These new method use pyroute2 IPRoute class, replacing the use of the
NDB class.
Partial-Bug: #2022357
Change-Id: Iff355d59d7e3bfe4434162b96391f9c7634accd9
This patch add the following new privileged methods implementations:
* create_interface: this method will be used to create dummy, vlan,
vxlan, bridge and vrf interfaces.
* delete_interface: to delete a interface
* set_link_attribute: to set UP the interface
* add_ip_address: to add an IP address on a interface
* delete_ip_address: to delete an IP address on a interface
* set_master_for_device: defines a master device for a second one
These new method use pyroute2 IPRoute class, replacing the use of the
NDB class.
This patch is creating the functional test framework, in order to
test these new methods.
This patch is also adding a new CI job to the gate (to be defined).
Partial-Bug: #2022357
Change-Id: I40d70829bfccb2df98b822afacbdab7da5a5ab7f
It seems sometimes we are getting [] instead of the ofport,
possibly due to a race between creating the interface and
attaching it to the ovs bridge. This ensure it is also
retried in that case
Change-Id: I2f0766c3a018336168c02ab77bbdfc9ed246a150
There may be cases where the port is not up, so it does not matter
if the chassis is set, we don't need to expose the IP, and the
opposite for the deletion. This also avoid races where the chassis
gets re-added but the port is still down, avoiding to process extra
events that are not needed
Change-Id: I64680c4ce8d776e57c16e06e0f376d7d9fba3733
Small code changes to use replace instead of set, and catch the
possible error/race adding an ip nei on a deleted nic
Also improve the add_ip_to_dev/del_ip_from_dev by getting the
address information outside of the ndb context
Change-Id: I627b58b6f245b3ad186832d0f3b1b5de59d61cae
In case the chassis and up event come in different updates we
need to ensure the fields are set in the old row, as it was
already done on the Deletion event. We also need to make sure the
up field is processed as a boolean to avoid false positives
In addition it is decreasing the timeout for patch ports to
appear as it not needed -- it was a wrong workaround
Closes-Bug: #2022925
Change-Id: I5bc54092cbe3b6b2046987a74eb9e90306d3519b
We are overwriting the run method to ensure it is catching any
possible exception generated and allow the driver/watchers to
continue working after that
Closes-Bug: #2022357
Change-Id: Ib66aa082b97b02c3662be647f477707fd8353ae0
It seems there can be more points where NetlinkDumpInterrupted
can happen, so adding extra protection just in case
Change-Id: Iffb67f33ed07c719983dace35002a6c167492f1f
It may happen that 5 seconds is not enough for the patch port
to be created, so doubling it to avoid the issue
Change-Id: I5a64875ea6a5b17a5fb6add974802ac377358138
The project is now part of openstack/governance, we now can publish the
documentation at docs.openstack.org instead of readthedocs.
Change-Id: I2a1577c1b7c12aba9ac91cd4b4857959fe1327da
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
In the ovn_stretched_l2_bgp_driver the function
is_router_gateway_on_any_chassis() can trigger the exception
DatapathNotFound which was not handled. In that case we ignore the port
now.
Traceback:
File "/usr/local/lib/python3.10/dist-packages/ovsdbapp/event.py", line
177, in notify_loop
match.run(event, row, updates)
File
"/usr/local/lib/python3.10/dist-packages/ovn_bgp_agent/drivers/openstack/watchers/bgp_watcher.py",
line 179, in run
self.agent.expose_subnet(ip_address, row)
File
"/usr/local/lib/python3.10/dist-packages/oslo_concurrency/lockutils.py",
line 414, in inner
return f(*args, **kwargs)
File
"/usr/local/lib/python3.10/dist-packages/ovn_bgp_agent/drivers/openstack/ovn_stretched_l2_bgp_driver.py",
line 219, in expose_subnet
cr_lrp = self.sb_idl.is_router_gateway_on_any_chassis(row.datapath)
File
"/usr/local/lib/python3.10/dist-packages/ovn_bgp_agent/drivers/openstack/utils/ovn.py",
line 317, in is_router_gateway_on_any_chassis
port_info = self.get_ports_on_datapath(
File
"/usr/local/lib/python3.10/dist-packages/ovn_bgp_agent/drivers/openstack/utils/ovn.py",
line 211, in get_ports_on_datapath
raise exceptions.DatapathNotFound(datapath=datapath)
ovn_bgp_agent.exceptions.DatapathNotFound: Datapath was not found:
<ovs.db.data.Atom object at 0x7f83b604c2b0>.
Change-Id: I5cfae5e818aeaf0c94d5540d1c83f9c86c25f779
This pathc optimizes the ofport information retrieval for patch
ports, so that there is no need to list them all, but just the
specific one
It also ensures that the "Added route" log message is only
logged if the wiring was succesfull
Change-Id: I42cbe9301f90148ff8d9f037dfa21817c12ffcca