115 Commits

Author SHA1 Message Date
Zuul
e431c09438 Merge "Allow to parse keywords in dns labels" 2021-06-22 13:31:32 +00:00
Lucas Alvares Gomes
7f0ca67ed6 Remove the devstack/lib/ovs in favour of "ovs_source" from DevStack
This patch removes the devstack/lib/ovs module and update the scripts to
use the ovs_source module from DevStack instead.

Depends-On: https://review.opendev.org/c/openstack/devstack/+/791085
Change-Id: I65fe53ee753ac68340f7d4d928643d3d8e5c8694
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2021-05-31 09:41:57 +01:00
Gregoire Mahe
7727fc07e6 Allow to parse keywords in dns labels
Co-Authored-By: Slawek Kaplonski <skaplons@redhat.com>

Related-Bug: #1843218
Change-Id: Ie8b6eb88e046c172d99212f966bdee327f42ed37
2021-03-10 17:03:12 +01:00
Zuul
c4846162b6 Merge "Update octavia plugin code" 2020-12-11 05:02:41 +00:00
Zuul
c17e817c78 Merge "Add Loki testing for Neutron" 2020-11-15 04:46:17 +00:00
Brian Haley
e10c0dedf4 ovn: Use new OVS commit hash
We have to pick OVS patches compatible with kernel 4.15.0-118
after switching to it.

Change-Id: I1ff47fc3398760d5b631bf89e6cfcc7ae339f0e3
Related-bug: #1883601
Closes-bug: #1896766
2020-09-23 16:14:32 +02:00
Brian Haley
2500ca0b22 Update octavia plugin code
When the Octavia plugin code was moved to the Neutron
repo it was put under an 'if is_plugin_enabled octavia'
check. Depending on the way a node is built, sometimes
the function doesn't seem to be defined, so remove it
since it's ok to always define it.

Change-Id: Ib8c7bac4d0111345f30b7d160fe9b4a8f2132106
2020-08-27 18:01:45 -04:00
Lucas Alvares Gomes
68ec29abf0 [OVN] Use the OVN DevStack module
The DevStack module for OVN has now been moved to the DevStack repository,
this patch is deletes it from the Neutron repository.

Depends-On: https://review.opendev.org/#/c/748140/
Change-Id: I2c30b8130525380234d767a7cb46f9bcca2a0d6b
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2020-08-26 10:09:28 +01:00
Nate Johnston
5b48b7ceff Add Loki testing for Neutron
This commit adds a non-voting job, based on tempest, which enables the
transient DB failure injection module 'loki' [1].  This will test
neutron resilience to database errors.

[1] https://docs.openstack.org/neutron/latest//contributor/testing/db_transient_failure_injection.html

Co-Authored-By: Slawek Kaplonski <skaplons@redhat.com>

Change-Id: Ie6293923a4a4744888bf3ee36007267ef0fddfd9
2020-08-05 20:38:52 +00:00
Lucas Alvares Gomes
164755264b [OVN] Bump OVN version to v20.06.1
This commit bumps the OVN version used in the gate from v20.03.0 to the
latest tagged version, v20.06.1.

Change-Id: Ie070f3c4d75272d12f295a2ea4f7fa6548a7b002
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2020-07-22 07:55:21 +00:00
Lucas Alvares Gomes
e7df43395c [OVN] DevStack: Make the transition of DevStack module easier
This patch intends to make the transition of the OVN DevStack module
easier by allowing both copies of it to exist at the same time, the one
in Neutron repository and the one in the DevStack repository [0].

1) Make create_public_bridge idempotent

If we call this function more than once the second call and on will fail
with the following error:

2020-07-13 09:12:53.885633 | controller | ++
/opt/stack/neutron/devstack/lib/ovn_agent:create_public_bridge:263 :
sudo ip addr add 172.24.5.1/24 dev br-ex
2020-07-13 09:12:53.894247 | controller | RTNETLINK answers: File exists

During the transiton of moving the OVN DevStack from the Neutron
repository to the DevStack repository [0] this method is being invoked
twice in the ovn job in the DevStack gate because it will be cause as
part of the plugin being enabled and the normal code execution.

This patch makes the method idempotent by calling "addr replace" instead
of "addr add" to avoid the "RTNETLINK answers: File exists" error.

2) Move the setup of the tcpdump on br-ex to "extra" to it can start
after the create_public_bridge is called.

[0] https://review.opendev.org/#/c/734621/

Change-Id: I74b05ef245a343c7531fa45aeadb90060b2fd22e
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2020-07-16 09:45:36 +01:00
Zuul
f96f3192e8 Merge "[OVN] Fix devstack module for OpenSuse" 2020-07-08 18:07:44 +00:00
Maciej Jozefczyk
fb2806f808 [OVN] Unify OVN/OVS compilation
There were duplicated methods doing almost the same in terms
of OVS/OVN compilation.

This change:
 * move of OVS related compilation code to devstack/lib/ovs
 * delete of OVS related compilation code from devstack/lib/ovn_agent
 * source unified functions in devstack/lib/ovn_agent from
   devstack/lib/ovs
 * Unify NEUTRON_PATH variable to NEUTRON_DIR

Closes-Bug: #1877377

Change-Id: Ia012a8e116a276a6674f86366c803e0e2d8ff704
2020-07-07 22:05:59 +00:00
Lucas Alvares Gomes
528e0d382e [OVN] Fix devstack module for OpenSuse
The default path for the OVS tools is /usr/local/bin [0] but, by default
this location is not included in the $PATH for some distros (e.g
OpenSuse).

This patch includes the $OVS_BINDIR to the $PATH variable for deploying
DevStack.

[0]
0fc38297ba/python/ovs/dirs.py (L23)

Change-Id: If7d68212cadb8eb8a12fa3271023c9e86b2d411e
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2020-07-02 13:54:37 +01:00
Slawek Kaplonski
0f4db58773 Enable bridge debugging services on the tempest and grenade jobs
This patch moves functions to enable br-ex-tcpdump and br-int-flows
services from the ovn devstack plugin to the main neutron devstack
plugin and enables it on all tempest and grenade jobs which are using
neutron-openvswitch-agent as a L2 backend.

Change-Id: Idfea869c08811914124d076da18cec17a12eee49
2020-06-21 10:47:24 +00:00
Jakub Libosvar
d086058895 ovn: Use newer OVS
OVS tag v2.13.0 is not compatible with current used kernel on upstream
Bionic Ubuntu kernel 4.15.0. This patch sticks to commit hash to unblock
the gate. We can either change to newer 2.13 tag once released or better
stop compiling OVS and use one packaged by Ubuntu.

Run functional/fullstack tests with selected OVN and OVS versions

Previously for functional tests OVS version was hardcoded - v2.12.0,
and OVN was installed from OVS repository.

After we merged OVN driver to Neutron tree we run both
Neutron/OVS and Neutron/OVN functional tests in one job.

This patch adds possibility to specify from which tag/branch OVS and OVN
should be checkout.

Change-Id: I83688031951b97bfe64f3aaa761ad7afc1d5ea55
Closes-Bug: #1883601
Closes-Bug: #1878160
2020-06-19 15:57:28 +02:00
Jakub Libosvar
dcd2e79c00 ovn: Fix use_new_ovn_repository
Previously, the function decided if the repository is after the split
based on the OVN branch name. This didn't work when a commit hash or other
branch name was used.

This patch changes the function to look at the tree and decide if the given
commit that split the OVN from OVS is present in the given OVS branch.

Change-Id: I89e1f450e4db4c9554e368d75155bec137074ba6
2020-05-25 09:57:31 +02:00
Zuul
354dcccf2d Merge "Default OVN_BRANCH and OVS_BRANCH to latest stable" 2020-05-22 14:10:53 +00:00
Maciej Józefczyk
0ba08d7eb4 Skip OVS module compilation for kernels newer than 5.5
For now OVS doesn't support compilation of kernel module
for kernels newer than 5.5 [1].
Recently Fedora 31 upgraded the kernel to 5.6.8 and that is
why the periodic jobs started to fail [2].
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.

Closes-Bug: #1877377

[1] https://zuul.openstack.org/builds?job_name=neutron-ovn-tempest-ovs-master-fedora
[2] 59e9944266

Change-Id: I63b2f198468c9e30af8284c8033fa31f2af2518a
2020-05-12 17:51:26 +00:00
Maciej Józefczyk
e0e3086b46 Default OVN_BRANCH and OVS_BRANCH to latest stable
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.

Change-Id: I6e36ccb8cf4846a1eb11619e7c339a0fc193c4f6
2020-05-11 16:26:11 +02:00
Flavio Fernandes
ba16d2fc74 [ovn] devstack needs to support openflow15
OVN has been changed to use Openflow15 [1].

Instead of creating br-int and setting the openflow version
via ovn_agent script, it is better to delegate the bridge
creation to the ovn-controller. Thus, having ovn-controller
creating br-int addresses the potential version mismatch.

[1]: 6ec0b82038

Change-Id: I62e4e98556c71312a7cf85b6246ddbecbc59a039
Related-Bug: #1871239
Closes-Bug: #1877195
2020-05-07 09:55:36 -04:00
Zuul
e9fd3e158e Merge "[OVN] Enable test_multicast_between_vms_on_same_network" 2020-05-06 15:39:58 +00:00
Zuul
5c0c234d04 Merge "Add Octavia file in devstack/lib" 2020-04-30 04:08:02 +00:00
Lucas Alvares Gomes
8ec41570a9 [OVN] Enable test_multicast_between_vms_on_same_network
This patch is adding support on DevStack and zuul job to enable the
test_multicast_between_vms_on_same_network test in the upstream gate.

Depends-On: https://review.opendev.org/#/c/721262
Change-Id: I0ee5c3daceb34b6810165c1e8a20aa3d5f21c74b
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2020-04-27 16:26:26 +01:00
Zuul
f70736b0e0 Merge "Start ovs if ovn-northd is enabled" 2020-04-26 08:27:11 +00:00
Maciej Józefczyk
ba35c0fc29 [OVN] Enable qos service plugin in tempest jobs
This patch adds QoS service plugin and enable QoS
tests whiel using OVN as a backend.

Note that:
* We need to compile OVS kernel module, in order to support
  OpenFlow Meter action in Ubuntu [1]
* Because of bug [2] for now we need also to create the integration
  bridge with specified OpenFlow version 1.3.
* Added qos extension to the list of neutron extensions in tempest
  config file to be able to run qos related tests.

[1] https://mail.openvswitch.org/pipermail/ovs-discuss/2018-December/048009.html
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1782834

Co-Authored-By: Slawek Kaplonski <skaplons@redhat.com>

Change-Id: I175511acef0e661bd1f282f37b1e528959c118a5
2020-04-20 17:32:56 +00:00
elajkat
7718cc0a6f Start ovs if ovn-northd is enabled
There are usecases where ovn-northd is running standalone with ovs, the
suggested local.conf is among the sample files (see: [0]). The service
however doesn't start as it needs OVS to run. This patch makes OVS
installed and started by ovn devstack plugin if ovn-northd is enabled in
local.conf.

[0]: https://opendev.org/openstack/neutron/src/branch/master/devstack/ovn-db-local.conf.sample

Change-Id: Ib12a076e50f010464735c6779d0e67bb218b66be
Closes-Bug: #1871730
2020-04-17 07:28:58 +00:00
Brian Haley
0493af3399 Add Octavia file in devstack/lib
Looks like this was initially missed on the OVN migration,
but after talking with Octavia, this setup should really
all live here since it's SDN-specific things that are
being configured.

Content basically copied from the octavia devstack/plugin.sh
script with some small modifications to support OVN.

Change-Id: Idb80cd164c6b41ca6636373696a9a1e7f19b5e62
2020-04-08 11:32:46 -04:00
Zuul
fe3832fee9 Merge "[OVN] Default to TLS for OVN-enabled tests" 2020-03-25 11:40:16 +00:00
Zuul
48c22256d6 Merge "[OVN] Switch release jobs to OVN 20.03 (v20.03.0 tag)" 2020-03-17 20:30:17 +00:00
Lucas Alvares Gomes
e0cb072b84 [OVN] Switch release jobs to OVN 20.03 (v20.03.0 tag)
OVN 20.03 (v20.03.0 tag) is the new stable released version of OVN which
is compatible with the OVS 2.13 version, also bumped in this review.

The patch also updates the use_new_ovn_repository to strip all
non-numeric characters of the branch name when comparing the versions,
that way we can compare branch-<version> against v<version> version
formats.

Change-Id: I06f06fbc42c625ad2deab03a92238ae5e68d9033
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2020-03-11 14:37:49 +00:00
Frode Nordahl
03ef29b1f0 [OVN] Default to TLS for OVN-enabled tests
OVN makes use of TLS for authorization and authentication of its
peers and it does not really make sense to deploy without it.

Let's reflect this fact in the functional tests.

Change-Id: Ibaec2043a45c52cffba0a5ca376eaa453e62df5a
Related-Bug: #1847032
Related-Bug: #1850160
2020-03-09 08:43:43 +01:00
Zuul
c12bc5c097 Merge "Provide meaningful defaults for OVN/OVS_REPO_NAME" 2020-03-06 19:02:11 +00:00
Zuul
3e7ca41190 Merge "Limit ovn sanity checks to q-svc" 2020-03-06 03:47:30 +00:00
Zuul
43e6e87118 Merge "Add tag-ports-during-bulk-creation to devstack" 2020-03-06 00:22:33 +00:00
Bence Romsics
295480c53c Provide meaningful defaults for OVN/OVS_REPO_NAME
In local dev environments devstack may be configured to clone
a component from a git repo with a working directory, for example:
$HOME/src/ovn/.git

The original logic took the the base name without the .git extension
as the repo name to use - for this path that is the empty string,
which of course did not work.

This change supplies a meaningful default repo name for cases like this.

Change-Id: I3a2796f67d7f0634b1f25d44f4fa229d31ef9cc1
2020-03-05 10:47:49 +01:00
Zuul
a9d6eae110 Merge "Rename devstack service neutron-ovn-metadata-agent" 2020-03-03 23:40:32 +00:00
Bence Romsics
6b01ecf9ea Limit ovn sanity checks to q-svc
The sanity checks related to neutron-server config only make sense
when q-svc service is enabled. When building a devstack without q-svc
(for example a compute-only devstack) do not force this configuration
to be present where it's meaningless.

Change-Id: I5b9176d4a55a826f498e367f1f02569429dbe546
2020-03-03 14:43:01 +01:00
Bence Romsics
02a7e96743 Rename devstack service neutron-ovn-metadata-agent
... to q-ovn-metadata-agent.

To the best of my understanding we decided to keep using the
neutron-legacy devstack module since it is the one used in the gate:

http://lists.openstack.org/pipermail/openstack-discuss/2019-December/thread.html#11544

And we merge new features like the ovn migration only working with
neutron-legacy:

https://review.opendev.org/696592

It seems to me we were a bit inconsistent in naming devstack service
'neutron-ovn-metadata-agent' since legacy style devstack service
names start with 'q-'.

For example this sample config is broken:

https://opendev.org/openstack/neutron/src/branch/master/devstack/ovn-compute-local.conf.sample#L31-L35

stack.sh dies with:

lib/neutron: line 368: neutron_plugin_create_nova_conf: command not found

Because not having a single 'q-' service in that enabled service list
we trip up devstack's 'is_neutron_legacy_enabled' check:

e51cbf0ea9/lib/neutron (L127-L135)

This change renames devstack service neutron-ovn-metadata-agent
to q-ovn-metadata-agent.

I'm not proud to propose this change in 2020 (circa 5 years after
the rename from Quantum to Neutron) so let me know if you see a better
way. :-)

Change-Id: I507a3426e2b63bff49891bd5a51fa9d9999a0ffa
2020-03-03 14:43:01 +01:00
Lucas Alvares Gomes
18c63a7148 [OVN] DevStack: Split the OVN_BRANCH and OVS_BRANCH variables
We will soon have different version for OVN and OVS, this patch is
splitting the OVN_BRANCH and OVS_BRANCH variables in the DevStack
module.

Change-Id: Icf32d168d177268afeb02c95084543d97f4f07e6
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2020-03-02 15:41:27 +00:00
Miguel Lavalle
d6e1523f78 Add tag-ports-during-bulk-creation to devstack
Add tag-ports-during-bulk-creation to devstack

Change-Id: I838de14f183f805c19411218edb815e190f8d650
2020-03-01 18:59:15 -06:00
Lucas Alvares Gomes
e64bf6be1b [OVN] Devstack: Fix adding another compute node
In order to add another compute node to an existing DevStack setup
(multi-node) we need to set a few extra variables to the local.conf to
enable the OVN driver in neutron.

The patch is also adding a new neutron_plugin_create_nova_conf function
to the ovn_agent module (no-op) otherwise the DevStack setup will fail.

Change-Id: I4d53f7206f151dc7ffa51b4c8bd601279aa88a46
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2020-02-10 13:21:36 +00:00
Zuul
6ec341ba4e Merge "Fix OVN agent devstack script to support IPv6" 2020-01-29 12:12:07 +00:00
Brian Haley
7fa564ba2c Fix OVN agent devstack script to support IPv6
There are variables in devstack that should be used
for services listening endpoints which change depending
on what SERVICE_IP_VERSION is set to, 4 or 6. Use them
in the ovn_agent script to support IPv6.

Change ovsdb-server to listen on [$SERVICE_LOCAL_HOST]
if IPv6, else 127.0.0.1 if IPv4.

Change ovn-northd to listen on 0.0.0.0 instead of
$SERVICE_LISTEN_ADDRESS.

Un-quote the metadata host address if it is IPv6, i.e.
2001:db8::1, not [2001:db8::1].

Closes-bug: #1860612
Change-Id: I5e9b6b70b502caf9dd6ec78f293f9d4b5b45e360
2020-01-28 18:26:39 -05:00
Bence Romsics
426afcfe02 [OVN] Use STACK_USER's actual primary group in starting services
devstack/lib/ovn_agent previously hardcoded the expectation that there
is a group with the same name as $STACK_USER. This group exists in a
default Ubuntu installation, but not in all possible systems.

This change starts all services previously using this group under
$STACK_USER's actual primary group.

Change-Id: I2015157e07f8284199cd4926d7d83bc1bb637339
2020-01-20 10:59:45 +01:00
Lucas Alvares Gomes
48ab58b46e [OVN] Change DevStack to use the local OVN driver
This patch is changing DevStack to deploy with the local OVN driver
(instead of the networking-ovn old repo).

A few tweaks were needed in the code in order to get it to work, more
precisely:

* OVN metadata configuration was pointing to some module variables that
  didn't exist.
* OVN metadata configuration generation was missing

Below is the following configuration needed in the local.conf to deploy
OVN:

[[local|localrc]]

enable_plugin neutron https://opendev.org/openstack/neutron

Q_AGENT=ovn
Q_ML2_PLUGIN_MECHANISM_DRIVERS=ovn,logger
Q_ML2_PLUGIN_TYPE_DRIVERS=local,flat,vlan,geneve
Q_ML2_TENANT_NETWORK_TYPE="geneve"

enable_service ovn-northd
enable_service ovn-controller
enable_service neutron-ovn-metadata-agent

disable_service n-net
enable_service q-svc

disable_service q-agt
disable_service q-l3
disable_service q-dhcp
disable_service q-meta

Change-Id: I0b899a33943550a53822d1d057cdee525cbbc6ec
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2020-01-16 09:28:43 +00:00
Flavio Fernandes
7d5cd3f47d [OVN] TrivialFix: use_new_ovn_repository must check major version
use_new_ovn_repository function is used to determine whether
OVN source is co-located with OVS repo or if it is post-split [1].
In a nutshell, OVS versions 'branch-2.13' and newer are on a
separate repo [2].

The existing implementation only looks at minor portion of version
to determine if OVN is post-split, which is not future proof.

Since 'M' comes after 'B', the logic sees 'master' as newer
than 'branch-2.12', which is actually the wanted behavior.

[1]: f3e24610ea
[2]: https://github.com/ovn-org/ovn

Change-Id: I7abeb05ea53b6eeced77ca9490a9bb7c5c07c64c
Signed-off-by: Flavio Fernandes <flaviof@redhat.com>
Co-authored-by: Terry Wilson <twilson@redhat.com>
2020-01-14 06:19:00 -05:00
Jens Harbott
57bc6d167b Allow to select subnets to publish DNS records
As described in [0] a new attribute ``dns_publish_fixed_ip`` is added
to subnets, allowing to specify directly whether DNS records should be
published for this subnet. This overrides the previous behaviour that
makes this decision based on various properties of the network that
the subnet is contained in, see [1].

[0] https://launchpad.net/bugs/1784879
[1] https://docs.openstack.org/neutron/latest/admin/config-dns-int-ext-serv.html

Change-Id: I14605ead2694d9e9422b3d7b519aed2e3c340e2a
Partial-Bug: 1784879
2019-12-14 13:36:09 +00:00
Lucas Alvares Gomes
96741866a7 Move DevStack OVN module to Neutron
This patch is moving the DevStack module to deploy OVN to the Neutron
DevStack plugin.

As a first step, this plugin will continue to use the
openstack/networking-ovn repository and, as we advance into the mergings
steps we will modify this plugin (just few lines) to use the code in
the Neutron repository itself.

TODO's where left in the code on top of all the bits that will change
once the networking-ovn code is merged into Neutron.

Below is a snippet of the what needs to be enabled in local.conf to get
OVN deployed:

[[local|localrc]]

enable_plugin neutron https://opendev.org/openstack/neutron

Q_AGENT=ovn
Q_ML2_PLUGIN_MECHANISM_DRIVERS=ovn,logger
Q_ML2_PLUGIN_TYPE_DRIVERS=local,flat,vlan,geneve
Q_ML2_TENANT_NETWORK_TYPE="geneve"

Partially-Implements: blueprint neutron-ovn-merge
Change-Id: I24ab11ab923339959eecfbaed79a3ceadc4a87f4
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2019-12-05 11:06:44 +00:00
Zuul
4c41e65415 Merge "Fix designate driver not being fully region aware" 2019-10-03 23:51:35 +00:00