349 Commits

Author SHA1 Message Date
Eduardo Olivares
4c7b76f3db Add retries to get_device_port_at_ovs
Extending retries added to `get_ovs_patch_port_ofport` at [1].

[1] https://review.opendev.org/c/885976

Closes-Bug: #2080258
Change-Id: Id41336ad235159d5fbe125c6c1bbecd2a73a819e
(cherry picked from commit e615106ab89f38e7ad9ff60ea468ad161a8f77db)
2024-10-14 14:22:11 +00:00
Dmitrii Shcherbakov
656a427e39 Make the local chassis ID configurable
ovn-controller can be configured with a system-id override file or
-n option to use any suffix for OVSDB options. Currently ovn-bgp-agent
just uses a constant "bgp" for this and there is no way to change it.

48db2a7a35

Let's allow this suffix to be set via a config option instead.

Change-Id: Ida30b46e16ddcdc2d82af980546876f72a845c1d
(cherry picked from commit e3cb1b4a472e0c2743690af62768a96a1c2b8c00)
2024-07-19 10:03:43 +00:00
Michel Nederlof
62c63f9855 Add the forgotten cleanup, that potentially messes up the next test in the py311 test
(if called by the same worker..)

Change-Id: I3d0a354d999f7a69b7ae5ceaf9ab2f3d59739132
(cherry picked from commit c0459dc8c6607b8f1cb742a6fad23738bc8c5118)
2024-07-05 09:48:51 +00:00
Luis Tomas Bolivar
f5640789cf Ensure cr-lrp permanent ip nei entry is added on NB DB driver
There wire provider port function had two definitions for the same
parameter (mac and lladdr). This patch is merging them and ensuring
it gets used on the NB DB Driver so that the PERMANENT ip nei entries
get added for the router gateway ports (cr-lrp)

Closes-Bug: #2068699
Change-Id: I9649cd185b100c9941887e3440bad8d39881f92c
(cherry picked from commit a4e307e6f53794532284f02c91c0ff7a96fb242f)
2024-06-26 11:57:05 +00:00
jayjahns
b71ce99ff6 Announce lrp ip if advertisement method is subnet
In the case of the subnet advertisement method, we do not
announce the route to the tenant subnet via BGP. While the routes
in br-ex are good, they do not fully expose the subnet.

This change exposes the router interface that connects the
tenant subnet.

Closes-Bug: 2068730
Change-Id: Id7dd902e5e2010ba41052cc9316db8518349c755
(cherry picked from commit bc1dc8ec9ea2438fe89ad0d9535dfddd05c463d9)
2024-06-14 09:33:17 +00:00
Luis Tomas Bolivar
1920102b15 Ensure cr-lrp ports are exposed
Even if expose_tenant_networks is not enabled, cr-lrp IPs must
be exposed

Closes-Bug: #2068028

Change-Id: Ibcffbad5204bfbc1a42c157755ac9ae9d7b67766
(cherry picked from commit d24d6fbf9fbd8dab260fd6c720d42edd052f76a9)
2024-06-10 13:22:02 +00:00
Michel Nederlof
47c18ffaa4 Add support for l3vpn with NB driver
Creates VRF/VXLAN per VNI, exposed through FRR with kernel routes
Vlan interfaces are added to the appropriate VNI, configured per bgpvpn
config options on the logical switch.

Related-bug: #2051105
Change-Id: I097c4629922d787827aba7761164f4004ed1305a
(cherry picked from commit b3ca890f471fc2694342edc1f22670913cece934)
2024-05-23 07:27:08 +00:00
Jakub Libosvar
bd0d29c71f Fix sync for OVN LB VIPs
There was a bad comparison of datapath types, we compared router
datapath is equal to loadbalancer datapaths instead of if it is included
there.

Closes-bug: #2064922

Change-Id: I4f92d75f512ca906ad884e9da21ee7048b1dc5d6
Signed-off-by: Jakub Libosvar <libosvar@redhat.com>
2024-05-06 17:42:26 +00:00
Michel Nederlof
047d261cb7 Fix placement of lsp when external_ids not in sync
When options.requested-chassis is not in sync with
external_ids.neutron:host_id it would pick both hosts, causing duplicate
announcements from more than 1 host.

This has been fixed in change 910305, but was left unchanged for the
sync method, causing issues when the sync interval was re-evaluating all
lsp's on the node.

The code for determining the chassis of a port has been moved from the
base_watcher to driver_utils so the logic for the event is the same as the
logic when fetching the records from the northbound database.

Related-bug: #2049902
Change-Id: I545d6b41fd308eb56e5295657260718dc14868f7
(cherry picked from commit 1bacff1dff825d267c390752fa21592c2e6f6588)
2.0.0.0rc2 2.0.0 2.0.1
2024-03-19 12:59:04 +00:00
9f93e3299b Update TOX_CONSTRAINTS_FILE for stable/2024.1
Update the URL to the upper-constraints file to point to the redirect
rule on releases.openstack.org so that anyone working on this branch
will switch to the correct upper-constraints list automatically when
the requirements repository branches.

Until the requirements repository has as stable/2024.1 branch, tests will
continue to use the upper-constraints list on master.

Change-Id: I481fc4bce82210822f63a3f80732facccf2a7fb6
2024-03-14 07:22:36 +00:00
abf1696e28 Update .gitreview for stable/2024.1
Change-Id: I3288bc591922aaa260a6d18fb6f6aff15921060c
2024-03-14 07:22:35 +00:00
Michel Nederlof
8f3351072c [NB watcher] Prevent lsp events for remote tenant events
Added check in LSP events to see if the event would belong to a network
that is exposed remotely (e.g. tenant networks behind router)

Change-Id: Idcc7880fc877f0a876c65bb1877ec4f89c2af5aa
2.0.0.0rc1
2024-03-08 15:50:08 +01:00
Zuul
dcfffb0d98 Merge "Change default to NB DB Driver" 2024-03-08 11:57:40 +00:00
Zuul
50b505c08c Merge "Add bgp tempest job" 2024-03-08 11:51:33 +00:00
Luis Tomas Bolivar
fde5a7a1f4 Change default to NB DB Driver
Besides changing the default driver to the NB driver, it also
adapt to the new section for the ovn configurations

Change-Id: I9a2d0bc9b80fdf0c9e92d06103c03dcf5b018f49
2024-03-08 10:01:13 +01:00
Luis Tomas Bolivar
c00139d559 Fix typo for linux util function used at evpn driver
Change-Id: I3503d0cd40485f4c44bdcd010b0e6ac7e8167bf1
2024-03-06 13:30:20 +01:00
Zuul
aa87c61831 Merge "Fix OVN LB Delete events for NB driver" 2024-03-04 12:11:03 +00:00
Zuul
f8a21b77c9 Merge "Fix address scope test and add address scope unit tests" 2024-03-01 15:03:35 +00:00
Luis Tomas Bolivar
aa86897663 Bump OVS version (branch 3.3) for devstack local.conf sample
Change-Id: Ie7beb7682ff8cd0f35e5c566fbfb3a50f9168726
2024-03-01 15:04:49 +01:00
Fernando Royo
e6201b35bc Fix OVN LB Delete events for NB driver
When deleting an OVN LB with an attached FIP, the FIP is not
withdrawn from the BGP interface where it was exposed.

This patch corrects the behavior in accordance with the events
received from the OVN NB DB, taking as main source the vips
field provided in events to detect if added/removed entries.

Closes-Bug: #2049535
Change-Id: If0bca4a39a857364582804b64140f9a36bfc422a
2024-03-01 10:43:38 +01:00
Michel Nederlof
22ac0386f5 Fix address scope test and add address scope unit tests
Change-Id: I413fd8a22c30ea9dad5e2cf69bfd3d6bc18468ed
2024-02-29 11:09:06 +01:00
Michel Nederlof
326ec40230 Add feature to check if SNAT disabled before exposing tenant networks
If SNAT on the router is enabled, then the subnet is reachable
from the outside, but all new sessions created from within the subnet
will be SNAT-ed. So those sessions will use the external IP of the router.
For example whitelisting specific tenant ips would not be possible.

With SNAT disabled, the neutron router will act as a normal gateway, and
sessions created from within a tenant vm will be sent from the real ip.

Closes-Bug: #2052292
Change-Id: Ib97065fb2fcca069195278fea804256370d21816
2024-02-27 09:21:59 +00:00
Zuul
1362df06b3 Merge "Update NB driver to re-use new methods and make code cleaner" 2024-02-26 12:23:48 +00:00
Zuul
9f50cbdce0 Merge "Fix event handling for LSP and prefer the options.requested-chassis info" 2024-02-26 12:23:47 +00:00
Michel Nederlof
7243e1c1ab Fix backward compatibility for setups that export subnets per host
Closes-Bug: #2054696
Change-Id: I8a6c2d5e9c426f698c250793462ee5ef769748ab
2024-02-22 15:52:43 +01:00
Zuul
7fa2f22daa Merge "Trimm interface name consistently" 2024-02-22 12:00:05 +00:00
Zuul
1b371dfc03 Merge "Disable exposing remote_ips, when only the lrp prefix is sufficient" 2024-02-22 11:42:43 +00:00
Michel Nederlof
31c241ce6c Update NB driver to re-use new methods and make code cleaner
Change-Id: I6c3520dfe9bddb30008f61bbbf0d1bc2f4ed30a2
2024-02-22 11:55:06 +01:00
Michel Nederlof
6e0d576650 Fix event handling for LSP and prefer the options.requested-chassis info
Since the requested-chassis superseeds the placement in external_ids
(which is managed by neutron), we should preferable use that instead of the
value set by neutron (which _could_ lag or be wrong in specific scenario's)

Also update logic for FIP handling to make migrations more efficient.

Closes-Bug: #2049902

Change-Id: I7f73a1ba7956f22e58fdde383775e88bf72cba14
2024-02-22 11:47:26 +01:00
Michel Nederlof
5da36a2638 Disable exposing remote_ips, when only the lrp prefix is sufficient
This also requires to use redist kernel in FRR, so there is a change
here which allows to define the default redistribute options in the FRR
template.

Since now this method is now available, the separate KERNEL_LEAK template
can be removed, as the only difference was the redist kernel, instead of
redist connected.

Related-Bug: #2017886
Change-Id: I570d8c482f3d17d63d66699e402c84dc61787638
2024-02-22 10:31:26 +01:00
Dmitriy Rabotyagov
1ac77aba49 Trimm interface name consistently
In create_interface method we trimm interface name up to 16 symbols,
however in all following methods we do not care about same trimm, which
causes calls to such interfaces fail with NetworkInterfaceNotFound

Closes-Bug: #2054599
Change-Id: I15f773afa64079eec6534c53eab0e9b7dd796d5f
2024-02-21 19:54:04 +01:00
Luis Tomas Bolivar
921e39ba02 Fixes at the documentation
This is a follow up of [1]

[1] https://review.opendev.org/c/openstack/ovn-bgp-agent/+/903407

Change-Id: Ifda13d090b1e298ae8b5393a313c2ea4df105fcb
2024-02-19 09:14:31 +01:00
Zuul
5cb7349091 Merge "Add documentation about NB DB driver" 2024-02-16 16:55:34 +00:00
Jakub Libosvar
9bf72c14e3 Add bgp tempest job
Change-Id: I927599f00101545db640444ac2c32e90b510b381
2024-02-09 13:42:16 +00:00
Takashi Kajinami
b20f5d5526 tox: Drop envdir
tox now always recreates an env although the env is shared using envdir
options.
~~~
$ tox -e genpolicy
genpolicy: recreate env because env type changed from
{'name': 'genconfig', 'type': 'VirtualEnvRunner'} to
{'name': 'genpolicy', 'type': 'VirtualEnvRunner'}
~~~

According to the maintainer of tox, this functionality is not intended
to be supported.
https://github.com/tox-dev/tox/issues/425#issuecomment-1011944293

Change-Id: I18ad8e5de031bc6be1b8e01860585ffae5ec0aa5
2024-02-02 23:51:27 +09:00
Zuul
269f324b24 Merge "Address the Load_Balancer's datapath_group column deprecation" 2024-02-02 12:07:08 +00:00
Lucas Alvares Gomes
5ffe0ce083 Address the Load_Balancer's datapath_group column deprecation
OVN deprecated the datapath_group column from Load_Balancer table. Now
this column was split in two: ls_datapath_group and lr_datapath_group.
This patch changes the code to also look for the datapath group in these
new columns.

This change is backward compatible and will work with a newer or older
version of OVN.

Change-Id: Ia3a95b77fccaa056aa9169114d102258f015002f
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2024-02-02 11:40:01 +00:00
Zuul
8d3273f6c6 Merge "Add support to PF OVN LBs for NB Driver" 2024-02-01 22:36:52 +00:00
Luis Tomas Bolivar
f94c041e7a Add documentation about NB DB driver
This includes the option to use the OVN-Cluster for routing
instead of the kernel.

It also updates the supportability matrix to better reflect the
current status, and makes a little reorg on the organization
structure

Change-Id: If8fb9a42f74511e9f70a25d7c08dce99c20c3f10
2024-01-31 15:13:29 +01:00
Michel Nederlof
2402fdcc00 Check for networks on router port in match_fn
Ideally the _run method should not do a check to see if row is valid.
Also, add the _get_ips_info method in base to get in line with LSP events

Change-Id: I7320ba37d622cd6b7de55e994caf657fb8b70b8d
2024-01-29 16:17:18 +01:00
Fernando Royo
c923bd9c79 Add support to PF OVN LBs for NB Driver
This patch adds support to the OVN LBs created when a port forwarding
(PF) is configured over a FIP for the NB driver.

Closes-Bug: #2049415
Change-Id: I95d132172d54329306f41fee2cc631e27ccfd8c4
2024-01-29 11:37:46 +01:00
Zuul
43c6614e1c Merge "Use .coveragerc to omit directories" 2024-01-26 09:23:04 +00:00
Takashi Kajinami
54bddd5b9f Use .coveragerc to omit directories
We can use the omit option instead of adding --omit argument, so that
we can run coverage commands outside of tox easily. Also this fixes
the inconsistent omit used in some coverage commands in tox.

Change-Id: I1efa406401c2e8a6b705daef4921b2dec7d55f2e
2024-01-26 16:01:31 +09:00
Zuul
6678aa5250 Merge "Fix startup if the hostname is not configured in OVS" 2024-01-22 11:20:35 +00:00
Michel Nederlof
c8970b667c Fix startup if the hostname is not configured in OVS
When deployed with Kolla Ansible, the hostname field is not configured
in the external_ids column, and apparently ovn-controller is not
populating it as well if it is missing.

Since ovn-controller is using the hostname of the machine if it is not set
[1][2], it makes sense to do so here as well.

[1] https://github.com/ovn-org/ovn/blob/v23.09.1/controller/chassis.c#L99
[2] https://github.com/ovn-org/ovn/blob/v20.03.0/controller/chassis.c#L126

Closes-Bug: #2049756
Change-Id: Ic602c3fa9928e00cf4773dae4e91af5d11c758c7
2024-01-22 11:02:03 +01:00
Zuul
bea5695603 Merge "Fix FRR 9 mgmtd crashes when applying config" 2024-01-22 07:35:27 +00:00
Michel Nederlof
0eb8861602 Fix FRR 9 mgmtd crashes when applying config
The vrysh command also allows reading from file and when using
this option, it works perfectly.

Closes-Bug: #2049736

Change-Id: I6cbee6739d8dddb43118585d1c03ad3eda8e4cbf
2024-01-18 11:26:07 +01:00
Zuul
2fcf3a4c48 Merge "Refactor ensure_routing_table_for_bridge" 2024-01-18 09:37:19 +00:00
Jakub Libosvar
d302f52757 Refactor ensure_routing_table_for_bridge
The patch simplifies the function searching for used routing table or
generating a new one. Since the method is no longer massive and complex
the unittests were added.

Change-Id: I75d8c4fdaed38a99b721b9077088952aaeb1b9a6
Signed-off-by: Jakub Libosvar <libosvar@redhat.com>
2024-01-15 15:54:36 +00:00
Zuul
05b0421464 Merge "Use netaddr IPNetwork instead of parsing IP strings" 2024-01-15 10:27:53 +00:00