23410 Commits

Author SHA1 Message Date
Slawek Kaplonski
740ab628f4 Remove usage of the "firewall_driver" in the neutron server
Back in Newton, patch [1] added to the agents possibility to report in
the heartbeat messages if hybrid plug of the ports is required or not.
Usage of "firewall_driver" option by mechanism drivers (so on the
server's side) was kept just for backward compatibility.
But as we are now about 4 years from the [1] I think it should be safe
to do small cleaning, remove usage of this option in the neutron server
and not confuse users where this config option has to be set and why.

[1] https://review.opendev.org/#/c/311814/

Change-Id: I2ccc4c8784c64858acaa3c3431cf9a3d13e5e154
2020-05-14 23:55:59 +02:00
Zuul
cb55643a06 Merge "[OVN]: Make _delete_port() more error-resilent" 2020-05-14 00:33:54 +00:00
Zuul
80ac531a3f Merge "Skip OVS module compilation for kernels newer than 5.5" 2020-05-14 00:20:45 +00:00
Zuul
21b5e5afc1 Merge "Fix ovn-db-sync-util after removing l3 ovsdb connection" 2020-05-14 00:12:44 +00:00
Zuul
fc2ed6f477 Merge "Add Rocky milestone tag for alembic migration revisions" 2020-05-13 22:37:14 +00:00
Dongcan Ye
9ae865a5b5 Add Rocky milestone tag for alembic migration revisions
Add lacking alembic migration revisions for Rocky.

Change-Id: I287d7aea1ffa1a380ba627eb1c9addd794a8059c
Closes-Bug: #1878314
2020-05-13 02:30:01 +00:00
Akihiro Motoki
52e3fee5ef Switch to hacking 3.0.1
In hacking 2.0 or later, local-check-factory was removed as it is not
compatible with flake8 3.x and it is advised to use flake8's local
plugins [1]. neutron-lib provided a factory to register common hacking
rules, but it no longer works with hacking 2, so we need to define rules
defined in neutron-lib as flake8 local check plugin [2] explicitly.
This needs to be done in each neutron related project, so it is the
downside of the migration to hacking 2.x (I explored a way to continue
to use the factory but failed to find a good way to achieve this) but
I believe it is good to migrate the newer libraries.

* flake8ext decorator in neutron/hacking/checks.py is also replaced with
  hacking.core.flake8ext to avoid the copy-and-paste code.
* neutron-lib dependency is updated as neutron-lib 2.3 added hacking 3 support.
* Python modules related to coding style checks (listed in blacklist.txt in
  openstack/requirements repo) are dropped from lower-constraints.txt
  as they are not actually used in tests (other than pep8).
* HackingDocTestCase is now converted into normal test cases.
  HackingDocTestCase depends on the internal of hacking and pycodestyle
  so it looks better to use normal style of writing tests.

[1] https://docs.openstack.org/releasenotes/hacking/unreleased.html#relnotes-2-0-0
[2] https://flake8.pycqa.org/en/3.7.0/user/configuration.html#using-local-plugins

Change-Id: I92cf50a84bb587a0649a7cffee15cce4ce37d086
2020-05-12 16:58:41 -04: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
Zuul
08e9ec1b56 Merge "Open Victoria DB branch" 2020-05-12 17:05:29 +00:00
Zuul
2542020748 Merge "Add "qos_policy_id" field to "FloatingIP" OVO" 2020-05-12 17:05:25 +00:00
Brian Haley
0a4b95eec2 Fix some pep8 errors
A new pep8 style library must have been released which
is causing some new errors, E471 among them. Clean-up
on aisle 8.

Change-Id: I153abada74e8c522fe9866a239a36dbb8365a29e
2020-05-11 18:23:22 -04:00
Rodolfo Alonso Hernandez
8cfe41fa6b Add "qos_policy_id" field to "FloatingIP" OVO
This new synthetic field is linked to a "QosPolicyFloatingIPBinding"
register. This binding register will bind a QoS policy and a
floating IP.

Now is possible to provide this field in the create/update input
parameters. If provided, the "FloatingIP" OVO will create/delete the
"QosPolicyFloatingIPBinding" register.

The OVO takes this parameter from the DB object. When the DB object
is retrieved, the QoS policy binding register is retrieved too due
to a backref link in the "QosFIPPolicyBinding" DB model to the
"FloatingIP" DB model.

Change-Id: Ideb042a71336b110bbe0f9e81ed8e0c21434fc42
Closes-Bug: #1877404
Related-Bug: #1877408
2020-05-11 11:29:30 +00:00
Zuul
2ac52607c2 Merge "Complete removal of dependency on the "mock" package" 2020-05-10 12:57:39 +00:00
Zuul
244f2764b3 Merge "port_forwarding: extend support for OVN usage" 2020-05-09 14:26:29 +00:00
Zuul
0fce58fb07 Merge "[ovn]: Create neutron_pg_drop Port Group on init" 2020-05-08 22:54:47 +00:00
Zuul
87a0181dc2 Merge "Add OSP16.1 choice to migration plugin spec" 2020-05-08 19:12:44 +00:00
Zuul
93e295c108 Merge "[ovn]: Fix l3_plugin.add_router_interface to comply with RouterPluginBase" 2020-05-08 19:00:41 +00:00
Zuul
257b1656cf Merge "[ovn] devstack needs to support openflow15" 2020-05-08 14:40:46 +00:00
Zuul
73c26d6126 Merge "migration: Use ForceNeutronDriverUpdate when migrating" 2020-05-08 11:36:20 +00:00
Flavio Fernandes
102c442bcf port_forwarding: extend support for OVN usage
This commit adds possibility to configure fip port_forwarding
service plugin and l3 extension with devstack plugin for OVN.

Since OVN uses API workers, this change also introduces the
callbacks necessary in pf_plugin, so events related to port
forwarding are sent using neutron_lib callbacks registry.

Related-Bug: #1877447
Change-Id: I8124fac13bf4d802d232e8b3976e6a2cebc72106
2020-05-07 18:10:20 -04:00
Zuul
390c4ac55f Merge "Report L3 extensions enabled in the L3 agent's config" 2020-05-07 20:19:16 +00: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
634237c642 Merge "[OVN] Bump up transaction timeout for functional tests" 2020-05-07 13:19:01 +00:00
Harald Jensås
f951871430 Use dhcp-host tag support when supported
In dnsmasq 2.81 there is a regression (see [1] for details).
Prior versions of dnsmasq would select a host record where:
a) no address is present in the host record.
b) an address matching address family of the client request
   is present in the host record.

dnsmasq 2.81 will also use a host record where a only an address
not matching the address family of the client request is present.

The same issue is also backported to the dnsmasq-2.79-11.el8.x86_64
which is e.g. in RHEL 8.2 and Centos 8.

dnsmasq version 2.81 also adds support for using tag's on host
records. When a dhcpv6 request is received, dnsmasq automatically
sets the tag 'dhcpv6'.

This change adds a runtime check, testing for dnsmasq host entry
tag support. And adds 'tag:dhcpv6' to all IPv6 host records when
dnsmasq supports this.

Adding the tag makes dnsmasq prefer the tagged host for dhcpv6
requests, i.e it's a workaround fix for the regression issue.

[1] http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2020q2/014051.html

Closes-Bug: #1876094
Change-Id: Ie654c84137914226bdc3e31e16219345c2efaac9
2020-05-07 01:38:14 +02:00
Maciej Józefczyk
c9eeb5debd [OVN] Bump up transaction timeout for functional tests
We still can see occasional failures because of timeouts
in the test_ovn_db_sync tests, like 1 failure per week.

As per agreement during last IRC meeting we decided to
bump up the functional tests timout from 15 seconds to 30 seconds,
because we're still pretty behind the default value of 180 seconds.

Change-Id: Ib20cdd0bb7d24795c8bd5c84c6143000b9922b4d
Related-Bug: 1868110
2020-05-06 17:51:19 +02:00
Zuul
e9fd3e158e Merge "[OVN] Enable test_multicast_between_vms_on_same_network" 2020-05-06 15:39:58 +00:00
Lucas Alvares Gomes
8b234d8786 [OVN]: Make _delete_port() more error-resilent
This patch is making the transaction from the _delete_port() method in
OVNClient more resilient to errors where elements from that transaction
have already been deleted by another change in the database.

Prior to this patch, a few places could potentially raise RowNotFound
which would abort the whole transaction and would leave the a stable
port for being cleaned up after by the maintenance thread. This patch
tries to catch those exceptions that could potentially fail the
transaction.

Change-Id: I8fd1d1485269d23529a19085bd4aa4c6c74f5f91
Partial-Bug: #1874733
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2020-05-06 12:02:15 +01:00
Zuul
413b266bb0 Merge "migration: Replace paunch with podman and ip commands" 2020-05-06 11:02:14 +00:00
Zuul
8c2c1ad9f6 Merge "ensure default security group exists when filter by project_id" 2020-05-05 21:01:17 +00:00
Zuul
9beb6f806d Merge "Monkey patch original current_thread _active" 2020-05-05 15:43:06 +00:00
Terry Wilson
18dd0d4e55 Fix ovn-db-sync-util after removing l3 ovsdb connection
As a result of d92e71c2 the sync util can fail because it tries to
look up the ovsdb connection from the mechanism_manager under 'ovn'
but the sync util registers under 'ovn-sync'.

Change-Id: I6998b08672761a501e427aab5d581064d9425dde
Closes-Bug: #1876752
2020-05-05 15:32:22 +00:00
Flavio Fernandes
f1cc1bb281 [ovn]: Fix l3_plugin.add_router_interface to comply with RouterPluginBase
OVNL3RouterPlugin inherits from L3_NAT_dbonly_mixin, which inherits
from neutron.extensions.l3.RouterPluginBase

As maintenance task expects OVNL3RouterPlugin to behave as
RouterPluginBase, the add_router_interface should have the signature:

  add_router_interface(self, context, router_id, interface_info)

Note: With this change, the default behavior of OVNL3RouterPlugin's
_add_neutron_router_interface becomes idem-potent: multiple calls to add
the same interface will not fail. Because of that, the unit test
test_router_add_interface_dup_port no longer makes sense and is being
removed.

Closes-Bug: #1876148
Change-Id: I8010113b4d8c66ecbccf3126f322a8836d92e7ba
Signed-off-by: Flavio Fernandes <flaviof@redhat.com>
2020-05-05 06:56:20 -04:00
Slawek Kaplonski
6b360d2343 Report L3 extensions enabled in the L3 agent's config
Change-Id: I187ab3bf04d19c07c3f04ffb2161399a7dfd7ff3
Closes-Bug: #1876898
2020-05-05 12:55:49 +02:00
Rodolfo Alonso Hernandez
518b623d7e Open Victoria DB branch
Change-Id: I27d7f393d7ef9383ed3cb0e4338cbb6d767721d9
2020-05-05 07:08:59 +00:00
Zuul
2a6ab2e9c0 Merge "Optimize subnet retrieval during CIDR validation" 2020-05-05 06:08:26 +00:00
Zuul
17817fd6d9 Merge "Migrate neutron grenade jobs to be native Zuul v3" 2020-05-04 21:47:56 +00:00
Zuul
7c7bb024cc Merge "Remove unused method "_make_fixed_ip_dict"" 2020-05-04 18:06:05 +00:00
Roman Safronov
e4228cfa34 Add OSP16.1 choice to migration plugin spec
It was impossible to specify OSP version 16.1 when executing
ML2/OVS to ML2/OVN migration plugin.

Change-Id: I56dddbb5faf67191e61623d48b2b452de3ff76ce
2020-05-04 20:34:16 +03:00
Zuul
6552f59fff Merge "Add py38 package metadata" 2020-05-04 15:57:25 +00:00
Zuul
bd20f8515d Merge "Fix dhcpv6-statefull typo" 2020-05-04 11:11:38 +00:00
Zuul
eca1ee4d76 Merge "Add a /healthcheck URL" 2020-05-03 20:26:22 +00:00
Slawek Kaplonski
bc2a23a36a Migrate neutron grenade jobs to be native Zuul v3
This commit migrates neutron-grenade multinode jobs.
OVN job will be switched later.

Change-Id: Ibe613a48116aed9cbcc7c689a50c1ef9fba60f05
2020-05-03 13:52:54 +02:00
OpenStack Proposal Bot
aae5d0a38a Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I90fb5b0d34a6e266d76f76c7b08eabc76a39183e
2020-05-03 07:38:11 +00:00
Zuul
dafe60ffdd Merge "[OVN] Update sample local.conf to support QoS for OVN" 2020-05-03 01:41:48 +00:00
Zuul
93d55fb9cc Merge "Updates for python3.8" 2020-05-03 01:41:44 +00:00
Zuul
cf05570042 Merge "[OVN][metadata] Adding ERROR trace upon unexpected data" 2020-05-03 01:41:41 +00:00
Sean McGinnis
8b4ae58414
Add py38 package metadata
Now that we are running the Victoria tests that include a
voting py38, we can now add the Python 3.8 metadata to the
package information to reflect that support.

Change-Id: I2053adc65b86e6616c3998a3c8d3143a1d0dd28f
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-05-02 07:48:14 -05:00
Corey Bryant
ec7a5aa516 Monkey patch original current_thread _active
Monkey patch the original current_thread to use the up-to-date _active
global variable. This solution is based on that documented at:
https://github.com/eventlet/eventlet/issues/592

Change-Id: I49bfd9673abc7602b27dc48b8b490daaded2882c
Closes-Bug: #1863021
2020-05-01 16:05:16 -04:00
Brian Haley
8126f88894 Complete removal of dependency on the "mock" package
Now that we are python3 only, we should move to using the built
in version of mock that supports all of our testing needs and
remove the dependency on the "mock" package.

This completes removal of all references to "import mock",
changing to "from unittest import mock" in fullstack and
functional tests.

Added a hacking check to enforce it in future patches.

Change-Id: Ifcaf1c21bea0ec3c35278e49cecc90a101a82113
2020-05-01 12:05:34 -04:00
Jakub Libosvar
d7c23431ad [ovn]: Create neutron_pg_drop Port Group on init
The patch adds a short living connection in pre-fork routine that
creates neutron_pg_drop Port Group. Later after workers are spawned,
each worker also creates a short living connection and waits for an
event that the Port Group was created.

The short living IDLs limit its tables only for relevant tables so it
doesn't fetch the whole OVS DB to the local copy.

Closes-bug: #1866068

Change-Id: I1f5af36b8c3d5650f890edfed3c33dc206869824
Signed-off-by: Jakub Libosvar <libosvar@redhat.com>
2020-05-01 10:34:27 -05:00