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>
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
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
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>
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>
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>
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
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>
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
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
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
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
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
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
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>
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
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
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
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>
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
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
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
... 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
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>
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>
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
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
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>
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>
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
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>