369 Commits

Author SHA1 Message Date
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
Zuul
91478de4db Merge "Consolidate use of IP_VERSION_TO_FAMILY conversion" 2024-01-15 10:18:27 +00:00
Jakub Libosvar
1a5b44777d Remove copy&paste code from ensure_arp_ndp_enabled_for_bridge
TrivialFix

Change-Id: I29d93d2be406867ce5ba394b2dc8e747c05566b2
Signed-off-by: Jakub Libosvar <libosvar@redhat.com>
2024-01-15 08:43:29 +00:00
Jakub Libosvar
d485c05a99 Use netaddr IPNetwork instead of parsing IP strings
Change-Id: Ibab9fc4ff1d0179c4f3436bb92828df2e2ae2e95
2024-01-12 22:03:03 +00:00
Zuul
3e4a384896 Merge "Add netaddr as a requirement" 2024-01-12 16:42:35 +00:00
Zuul
87860fb44a Merge "Remove obtaining event classes from strings, vol 2" 2024-01-12 16:42:34 +00:00
Jakub Libosvar
1902d71c50 Consolidate use of IP_VERSION_TO_FAMILY conversion
The constant mapping has been defined in several places. This patch
creates a new module utils.common that defines the mapping and uses it
everywhere. It also encapsulates socket family constants in the
constants module and reuses the constants.

Change-Id: I754d4c06007db7d68ceaa64e76f3ef2305d7850c
2024-01-12 16:33:39 +00:00
Zuul
9852a8069f Merge "Remove core OVN backward compatible code" 2024-01-12 15:15:47 +00:00
Jakub Libosvar
e967221952 Add netaddr as a requirement
Currently netaddr is installed as part of the neutron-lib but it's safer
to explicitly list the requirement since the library is imported
directly.

Change-Id: I1cce4aee1109071e442c8df30d7f57714a9b92be
2024-01-12 14:58:37 +00:00
Jakub Libosvar
c2a04fc639 Remove obtaining event classes from strings, vol 2
The current Ubuntu image uses OVN 22.04 which is now almost 2 years old.
The schema contains both Logical_DP_Group and Chassis_Private so it's
safe to remove the code that assumes the tables might not be available.

This is a followup patch for the change
I05598c357b636d3d5d70d7cbefe6acae9dbf8033 that was only for NB OVN BGP
driver.

Change-Id: I8c61c1cff59ca2836cdf4256c921cfdfb291a36a
2024-01-12 14:50:12 +00:00
Jakub Libosvar
4cd15d1158 Remove core OVN backward compatible code
The current Ubuntu image uses OVN 22.04 which is now almost 2 years old.
The schema contains both Logical_DP_Group and Chassis_Private so it's
safe to remove the code that assumes the tables might not be available.

Change-Id: I3cb4219b173cce13354a024ce445865e5724d654
2024-01-12 14:43:18 +00:00
Zuul
60a9b7ca18 Merge "Remove obtaining event classes from strings" 2024-01-12 13:53:19 +00:00
Zuul
e65c0a88ab Merge "Remove re-typing lists to sets at initialization" 2024-01-12 13:41:13 +00:00
Zuul
75a182755c Merge "Generate config file using oslo-config-generator" 2024-01-12 09:38:02 +00:00
Takashi Kajinami
5aff8a4b7c Generate config file using oslo-config-generator
... so that we can review the available options more easily.

This also updates tox.ini to reuse the same environment for multiple
targets.

Change-Id: I561ff8a116c5a13784b83ff1450af965e6aff82c
2024-01-12 08:50:35 +00:00
Jakub Libosvar
d5171f8a67 Remove obtaining event classes from strings
The patch instantiates the events directly instead of collecting their
names and then calling getattr for each to instantiate it.

Change-Id: I05598c357b636d3d5d70d7cbefe6acae9dbf8033
2024-01-11 21:34:53 +00:00
Jakub Libosvar
df6be866e7 Remove re-typing lists to sets at initialization
The patch removes code where lists are generated and immediatelly
converted to sets. It also uses set comprehension where applicable.

Change-Id: I4f96a88e100593cfaf2a95f3aa409eed531c2ed4
2024-01-11 21:33:17 +00:00
Takashi Kajinami
96030ee354 Use common function to (un)install packages
... instead of implementing a similar logic in the plugin.

Change-Id: I14deb9f5c18dd987efc2eec1af2c3345d172d448
2024-01-10 19:27:39 +09:00
Zuul
841d419ed1 Merge "devstack: Install vrf kernel module if needed" 2024-01-10 09:27:45 +00:00
Jakub Libosvar
9e3a54805a devstack: Install vrf kernel module if needed
Depending on how the kernel was compiled vrf kernel module may not be
present on the box. This patch installs required packages that contain
vrf kernel module and installs the module as part of
`install_ovn_bgp_agent` function.

Change-Id: Ieb8351cf4eef6db7dc56fb21be9d0cedf6d2ffca
2024-01-09 19:38:25 +00:00
Takashi Kajinami
1aed511c8e Drop lower-constraints.txt
The content has never been tested in CI. Lower constraints are no
longer tested in neutron since l-c job was removed[1].

[1] bc8e512b4a7b68f2e5c31efd320d8b347d06bba0

Change-Id: I99c7ca171638cf058ec216a29e26f522d580fdae
2024-01-08 23:42:39 +09:00
Zuul
69ea9a96dc Merge "Fix watcher logic for exposing OVN LB with the NB DB driver" 2023-12-14 16:17:54 +00:00
Luis Tomas Bolivar
e388367076 Fix watcher logic for exposing OVN LB with the NB DB driver
Change-Id: I0641e79139d2452f1d6053f878769ff18a4a8a7d
2023-12-14 16:57:59 +01:00
Zuul
ef5b9de935 Merge "[UT] Fix the `TestLinuxNet` wrong assert calls" 2023-12-13 10:39:41 +00:00
Zuul
6ab2e5a658 Merge "Ensure NDB Proxy gets added for provider IPs too" 2023-12-13 10:06:47 +00:00
Luis Tomas Bolivar
99c5e1f541 Ensure NDB Proxy gets added for provider IPs too
NDB proxy is needed with newer ovn versions for proper redirection
of egress traffic for IPv6. This patch is adding it

Closes-Bug: #2046254
Change-Id: I055e332deebce25d08d596d469f3ad2bdb800579
2023-12-13 08:20:46 +01:00
Thomas Goirand
7f4f0993c5 Python 3.12: use importlib instead of imp
As per: https://docs.python.org/3/whatsnew/3.12.html
the imp module is gone. importlib has the same reload() function,
let's use it instead.

Change-Id: If3aa7d47fefd6a0fe416454d22cecd8dbed767f8
2023-12-12 14:37:30 +01:00
Luis Tomas Bolivar
546a8bef21 Ensure proxy arp and ndp is configure for flat provider networks
If there are flat and vlan provider networks configured on the
same ovs provider bridge, the arp/ndp proxy were not being
configured for the bridge, therefore breaking the connectivity
to the VMs on the flat network. This patch ensures it is always
configured

Closes-Bug: #2045401
Change-Id: I9e4cbe6861b6f83c90d664424a4eb905fe49e4a7
2023-12-01 10:41:19 +01:00
Zuul
b79b13b9ba Merge "Avoid race when deleting VM with FIP" 2023-11-28 14:48:38 +00:00
Luis Tomas Bolivar
4a02101fcc Avoid race when deleting VM with FIP
There is a chance that when deleting a VM with a FIP, by the time
the FIP is being withdrawn, the VM port has its chassis already
removed, which makes the withdrawn event to do nothing, leaving
the FIP exposed. This patch fixes that by removing the FIP if the
VM port associated has no chassis (in the same way as it was done
if the port was already deleted). This means it will be executed
in some nodes that should which do not have the IP exposed, but
that is preferred than leaving the FIP exposed while it should not.

Closes-Bug: #2044980
Change-Id: I3857ea10d8e313216e8f3e7252a0bc54a25b9efe
2023-11-28 15:23:04 +01:00
Luis Tomas Bolivar
c0e21895e5 Ensure withdrawn events are only processed in relevant nodes
The withdrawn events are evaluating the chassis changes but also the
status changes. When the status was changing it was not being
validated that the chassis was the local one, therefore executing
the withdrawn events in nodes there the IPs were not exposed. This
patch fixes it

Closes-Bug: #2044981
Change-Id: I86faa32a10e7185eac11671470200468fa7c9dda
2023-11-28 11:14:15 +01:00