Commit Graph

412 Commits

Author SHA1 Message Date
Rodolfo Alonso Hernandez
4109ee9bb4 Use the new network HA parameter
This patch implements the new network HA boolean field API extension.
This field is an input only parameter for POST operations (creation).
By default is "False". When enabled, the Neutron server will create
a ``ha_router_networks`` register in the same transaction of the
network creation.

If by any circumstance (a race condition, for example), another
``ha_router_networks`` exists in the same project, a
``DBDuplicateEntry`` exception will be raised and the transaction
will be rolled back.

Partial-Bug: #2016198
Change-Id: Ie42c13ecbe4abcad9229b71f6942e393fd0f2e4e
2023-08-25 08:43:37 +00:00
Brian Haley
67be07fd5b Add new DEFAULT option named "my_ipv6"
Add a new config parameter named "my_ipv6".
The default value for my_ipv6 will be the IPv6 address
of the interface used for the default gateway.

This new option is not used for now in any neutron code,
but may be used by operators to configure other options
(like local_ip, ovsdb_connection, etc.).

Requires oslo.utils version 6.2.0.

Change-Id: Icd802879e56aec00793b3683e84b16847d1c798d
2023-07-07 10:21:53 -04:00
Rodolfo Alonso Hernandez
ac231c8174 Improve "sync_ha_chassis_group" method
The method "sync_ha_chassis_group" now creates (or retrieves) a
HA Chassis Group register and updates the needed HA Chassis registers
in a single transaction. That is possible using the new ovsdbapp
release 2.2.1 (check the depends-on patch).

Depends-On: https://review.opendev.org/c/openstack/ovsdbapp/+/871836

Related-Bug: #1995078
Change-Id: I936855214c635de0e89d5d13a86562f5b282633c
2023-05-24 14:37:30 +00:00
Rodolfo Alonso Hernandez
f42d86cc0d Bump neutron-lib to 3.6.1
This new neutron-lib version has a fix related to the context
"elevated" method. Now this method includes all needed roles
(admin, member and reader) in the returned object.

This is needed if "noauth" is used in an API call (for example
in fullstack tests).

Change-Id: Ide01b38377ec8be604823e81fa5fed14c6999cd9
2023-05-22 13:29:49 +00:00
Bence Romsics
0390ada97c port-hints: api extension
api extension
db model
db migration
ovo (including changes affecting push rpc)
extension driver
policies

To enable this:

* neutron-db-manage upgrade 6f1145bff34c
* ml2_conf.ini:
  [ml2]
  extension_drivers += port_hints

This patch also bumps neutron-lib requirement to 3.5.0.

Change-Id: I80816618285d742775bc0534510c0f874f84ed2e
Partial-Bug: #1990842
Related-Change (spec): https://review.opendev.org/c/openstack/neutron-specs/+/862133
Related-Change (n-lib api-def): https://review.opendev.org/c/openstack/neutron-lib/+/870080
2023-05-09 11:49:17 +02:00
Maurice Escher
b00ae45140
ml2 plugin: use const from neutron-lib
Due to the neutron-lib dependency, this patch bumps the needed
library version to 3.4.0.

Depends-On: https://review.opendev.org/c/openstack/neutron-lib/+/869294
Related-Bug: #2003095
Change-Id: I1aa7b73621e049d8f8a7038e3679cb8bbfc6313f
2023-02-21 18:09:28 +01:00
Rodolfo Alonso Hernandez
1d84aaf877 Bump the minimum pyroute2 version to 0.7.3
This patch also removes the pylint disablement message control
statements and imports NetNS and IPRoute from the new locations
in pyroute2.

Trivial-Fix

Change-Id: I298a7da767473c236ddf03c5702a2904d4870284
2023-01-18 04:43:09 +01:00
Zuul
4fe1764676 Merge "Bump pecan to fix #1829042" 2022-12-06 20:22:44 +00:00
Bence Romsics
499ae95881 Bump pecan to fix #1829042
This has a long history [1][2] but at this point we are already using
1.4.0+ versions of pecan so this change is proven to be safe.

[1] https://review.opendev.org/c/openstack/neutron/+/752058
[2] https://review.opendev.org/c/openstack/requirements/+/747419

Change-Id: I9fa0ed8c2170baa98e4dad868e0f614f92f6c7ab
Closes-Bug: #1829042
2022-11-24 16:27:36 +01:00
Miguel Lavalle
33de608f04 Avoid race condition when deleting trunk bridges
Prior to this change, trunk bridges are created by os-vif but deleted
by Neutron when the last vif is removed from it. This creates race
conditions in some use cases, like DPDK with vhostuserclient mode, when
VMs are rebooted. To avoid these races, Neutron will not delete trunk
bridges anymore. Their creation and deletion will be os-vif's
responsiblity. Since [1], Nova uses the os-vif version that contains
this functionality.

This patch also changes the trunk status change event. During a live
migration, when the trunk parent port has been bound to the destination
host (that means there is only one port binding associated) and the
status has changed to ACTIVE, the method triggers the subport binding
to the new host too. This is because there could be a race condition
between the subport binding, triggered by the OVS agent, and the parent
port binding, triggered by Nova. If when the OVS agent tries to bind the
subports, the parent port is still bound to the source host, the subport
binding remains in the source host too, instead of changing to the
destination.

This patch also reverts [2] and [3]. As commented in the previous
paragraph, this patch fixes the issue reported in LP#1997025. The trunk
port live migration with ML2/OVS must be fixed with this patch.

[1]https://review.opendev.org/c/openstack/nova/+/865031
[2]https://review.opendev.org/c/openstack/neutron/+/865295
[3]https://review.opendev.org/c/openstack/neutron/+/865424

Closes-Bug: #1869244
Closes-Bug: #1997025

Change-Id: I4e16357f3ff214fcf41e418982806c24088a2665
2022-11-17 10:39:30 +01:00
Thomas Goirand
ea11928ba0 Neutron needs oslo.config >= 9
Building the Neutron package in Debian unstable fails,
because oslo.config 8.8.0 isn't enough. Adding a depends
on python3-oslo.config (>= 9.0.0), available from Debian
experimental, fixed my build. Please adopt this fix in
upstream Neutron.

Change-Id: Ibe2892e12b90d2e6d457e70f2a47a44972ec6193
2022-09-17 14:06:48 +02:00
Rodolfo Alonso Hernandez
812ef0306f `Session.autocommit` parameter is removed
Since [1] (in oslo.db>9.1.0), the ``Session.autocommit`` member
is removed and should not be considered. This patch removes this
dependency while keeping backwards compatibility. This code will
be removed in future releases.

Due to the neutron-lib dependency, this patch bumps the needed
library version to 3.1.0.

[1]https://review.opendev.org/c/openstack/oslo.db/+/804775

Depends-On: https://review.opendev.org/c/openstack/neutron-lib/+/851193

Closes-Bug: #1982818
Change-Id: Ibfcf9d5f6cd805f2d64fcd88049e2b43fedc3497
2022-08-10 17:15:04 +02:00
Rodolfo Alonso Hernandez
88fb5416f7 Bump neutron-lib to 2.21.0
This new neutron-lib version contains the patch [1], that provides
compatibility with SQLAlchemy 2.0.

[1]https://review.opendev.org/c/openstack/neutron-lib/+/828738

Related-Bug: #1962153
Topic: sqlalchemy-20
Change-Id: Ib2880b8fa61ae7691c527b837045cfa15226072c
2022-05-17 10:14:06 +00:00
Ghanshyam Mann
bc8e512b4a Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: If17736114adedf44b502fd7c91423a7822d7170b
2022-05-02 13:01:42 -05:00
Slawek Kaplonski
3939ec35af Bump oslo.policy to 3.12.0
It allows us to revert temporary fix part from [1] as now InvalidScope
exception is properly handled by oslo.policy.

[1] https://review.opendev.org/c/openstack/neutron/+/826872

Related-bug: #1959333
Change-Id: I6b42306479c134ad8b07b8bf87d5c650fef9faae
2022-05-02 12:47:16 +02:00
Terry Wilson
a13a4cb2da Fix setting table monitoring conditions
After the monitor_cond_since/update3 support patch in ovs
(46d44cf3be0), directly setting table.condition is broken. This
isn't something that was every truly supported. Prior to that
patch, using Idl.cond_change() before a connection was made
did not work, but after that patch it does.

This patch uses the old behavior when the OVS library does not
have the ConditionState object, and uses cond_change() otherwise.

Related-Bug: #1965819
Change-Id: I0503037b803a3c99fb7988bc20394c111ac456db
2022-04-19 15:39:21 +00:00
elajkat
74a9e832d7 Add retry for privsep get_link_devices
pyroute 0.6.6 introduced a new exception NetlinkDumpInterrupted which
is raised when NLM_F_DUMP_INTR is set in the flags during dump of
devices.
The suggestion from pyroute developers is to retry in case of this
exception (see [1]).

[1]: https://github.com/svinota/pyroute2/issues/874#issuecomment-1063139555

Closes-Bug: #1962608

Change-Id: Ie195ad596fd148708fc30946bde964d52444afee
2022-03-17 10:27:31 +01:00
LIU Yulong
b4a192a74c Bump python-neutronclient version to 7.8.0
Fullstack test cases need this release [1] of python-neutronclient.
Update the cliff version because:
    python-neutronclient 7.8.0 depends on cliff>=3.4.0
    cliff==3.4.0 requires stevedore>=2.0.1
    python-neutronclient 7.8.0 depends on osc-lib>=1.12.0

[1] https://review.opendev.org/c/openstack/releases/+/828442

Partially-Implements: bp/packet-rate-limit
Related-Bug: #1938966
Related-Bug: #1912460
Change-Id: Ibc1fbb90bf22128cd783c8d8598fb3c49591eae2
2022-02-23 08:55:49 +08:00
Frode Nordahl
7d64d0c116
[OVN] Off-path SmartNIC DPU Port Binding with OVN
Traditionally it has been the CMSs, in OpenStacks case Nova's,
responsibility to create Virtual Interfaces (VIFs) as part of
instance life cycle, and subsequently manage plug/unplug operations
on the Open vSwitch integration bridge.

With the advent of SmartNIC DPUs which are connected to multiple
distinct CPUs we can have a topology where the instance runs on one
host and Open vSwitch and OVN runs on a different host, the
SmartNIC DPU control plane CPU.

One of the main use cases for having this topology is security
where we treat the hypervisor host as untrusted and prohibit
direct communication between the hypervisor host and the SmartNIC
DPU control plane host.  In addition to that control facilities
such as switchdev devices are only visible from the SmartNIC DPU
control plane CPUs.

Adds support for binding ports of type VNIC_REMOTE_MANAGED by
looking up chassis based on serial number that Nova provides in
the binding_profile.

Information required by the OVN controller to successfully look up
and plug representor port is provided as options on the LSP as
defined by the representor plug provider documentation [0][1].

0: https://docs.ovn.org/en/stable/topics/vif-plug-providers/vif-plug-providers.html
1: https://github.com/ovn-org/ovn-vif/blob/main/Documentation/topics/vif-plug-providers/vif-plug-representor.rst
Partial-Bug: #1932154
Depends-On: I496db96ea40da3bee5b81bcee1edc79e1f46b541
Depends-On: I83a128a260acdd8bf78fede566af6881b8b82a9c
Change-Id: Icc6c2d0f7f8f5cc94997db6244175a8e8884789f
2022-02-18 07:17:36 +01:00
Rodolfo Alonso Hernandez
cde5657a50 [OVN] Sync QoS policies
The tool "neutron-ovn-db-sync-util" now syncs the Neutron QoS policies
with the OVN NB database. The tools reads the port and the floaiting IP
QoS policies and creates the corresponding OVN QoS rules.

The ovsdbapp library is bumped to version 1.15.0. This version updates
the "QoSAddCommand" to allow register updates. If the OVN NB QoS
register to be created is present in the DB and all parameters match,
no transaction is commited to the DB.

Depends-On: https://review.opendev.org/c/openstack/ovsdbapp/+/822138
Closes-Bug: #1947334

Change-Id: Ib597b62017b56b41009dd4d7359e169f424272b0
2022-02-02 19:21:21 +00:00
Zuul
da9fd503ce Merge "Disable tracebacks of eventlet.wsgi.server" 2022-01-12 10:39:14 +00:00
Bence Romsics
0256e494d0 Disable tracebacks of eventlet.wsgi.server
Security folks considered tracebacks in API responses unwanted.

Some additional lower constraints had to be bumped for the
lower-constraints job to pass.

Change-Id: Ibaefbb9935020318ed670774b0205f3bcffef4ad
Closes-Bug: #1951429
Depends-On: https://review.opendev.org/c/openstack/oslo.service/+/818548
2022-01-11 09:33:12 +01:00
Zuul
051face9d7 Merge "[OVN] Correctly set dns_server in dhcpv4/v6 options" 2022-01-11 08:03:37 +00:00
Zuul
204735f506 Merge "Fix expected exception raised when new scope types are enforced" 2022-01-11 01:41:34 +00:00
4a06685098 [OVN] Correctly set dns_server in dhcpv4/v6 options
When ovn/dns_servers consist of IPv6 dns nameservers,
it was getting added to IPv4 dhcp options also, and due to
this an invalid nameserver(last 4 octets of an IPv6 address)
is set in the instances.

This patch filters IPv4/IPv6 dns nameservers and set
dhcpv4/dhcpv6 options accordingly.

Also when dns_nameservers are not set for IPv6 subnets,
get those from ovn/dns_servers config or system nameservers
just like it's done with the IPv4 subnets. Updated
get_system_dns_resolvers to pick both IPv4/IPv6 valid
ips, this also requires bump of oslo.utils minimum version
to 4.8.0 to use strict option for IPv4[1].

Additionally fix some unit tests which were setting IPv4 dns
nameservers on the IPv6 subnets, this is not allowed with api.

[1] https://github.com/openstack/oslo.utils/commit/3288539

Closes-Bug: #1951816
Change-Id: I9f914e721201072e43a8c6c266ed97ca85fcc13d
2022-01-06 05:02:35 +00:00
Takashi Kajinami
eee92f5eaf Sync rootwrap.conf from oslo.rootwrap
The current rootwrap.conf file is outdated and doesn't include some
parameters. This change updates the content to make it consistent with
the latest example file in oslo.rootwrap.

Change-Id: I0b40b0bea4bbcbc78490dbfa3877cdd3a26ac298
2022-01-03 09:17:04 +09:00
Slawek Kaplonski
da8d0eaeea Fix expected exception raised when new scope types are enforced
After fix for the related bug will be fixed in oslo_policy [1],
InvalidScope exception will be raised for the API requests done with
project scope when "system" scope is required.
This patch changes our API policies unit tests to expect proper
exception to be raised in such cases.

This patch also bumps minimum required oslo.policy version to
3.10.1 which contains fix for the scope enforcement in the
custom rules.
Finally it also re-enables enforcing scope in those UT.

[1] https://review.opendev.org/c/openstack/oslo.policy/+/804980

Related-Bug: #1923503
Change-Id: I4c209fa4f504440a44d21a05f2703259f62519a5
2021-12-20 15:26:48 +01:00
7b61adbb4a List ports when attempt to delete network with ports
When there is attempt to delete network with ports,
a general error message is displayed that one or more
ports are in use on the network. This patch proposes
to also return the ports which are in use as part of
the message.

Also modify test_delete_network_if_port_exists unit
test to check for port id and network id in Error
message.

Also bump required version of neutron-lib to 2.18.0
as that's needed for custom message in NetworkInUse
Exception.

Depends-On: https://review.opendev.org/c/openstack/neutron-lib/+/821806

Closes-Bug: #1953716
Change-Id: Ib0b40402746c6a487a226b238907142384608d3c
2021-12-16 16:31:44 +05:30
e41d82e374 Bump lower-constraints for eventlet to 0.26.1
eventlet before 0.32.0 have issues with
dnspython>=2.0.0, eventlet-0.26.1+[1] have
pinned dnspython for this, so let's use that
version instead for lower-constraints.

This should help with timeouts seen in
openstack-tox-lower-constraints job.

[1] https://github.com/eventlet/eventlet/commit/4236143

Change-Id: I09826681cf61eb0ff6c82421e8e85a2044e95a4a
2021-11-24 11:44:01 +00:00
Rodolfo Alonso Hernandez
4909c8c18d Bump neutron-lib to 2.17.0
Remove the QoS constants from Neutron code. QoS constants are now
located in ``neutron_lib.services.qos.constants``.

This patch also reverts [1]. This patch was merged in order to
allow a newer neutron-lib release in "requirements". This test
was failing because the element order of the "VALID_RULE_TYPES"
list was different between Neutron and neutron-lib. That was
modifying the "QosRuleType" OVO hash.

[1]https://review.opendev.org/c/openstack/neutron/+/817940

Closes-Bug: #1950977
Related-Bug: #1922237
Change-Id: I31edea3cc0f4a284a773a35302997ca6069efc95
2021-11-17 10:09:14 +00:00
Rodolfo Alonso Hernandez
d4d90fb6d7 Improve "get_collection_count" calls
Reduce the object retrieval to one single field to improve the
collection count.

Bumped neutron-lib to 2.16.0. This version contains [1], needed for
this patch.

[1]https://review.opendev.org/c/openstack/neutron-lib/+/807686

Related-Bug: #1942863

Change-Id: I160e8084e97b23a2bacb49ceb40efbac2d0715be
2021-10-18 07:56:13 +00:00
Slawek Kaplonski
5665fc437b Bump os-ken to 2.2.0
Related-Bug: #1944201
Change-Id: Ib699fd096cf7e7d5df83ee4942e287eecf5a0b8f
2021-10-12 17:53:16 +02:00
Rodolfo Alonso Hernandez
42fda206e9 Replace "Inspector.from_engine()" with "sqlalchemy.inspect()"
Since SQLAlchemy 1.4, the method "Inspector.from_engine()" is
deprecated.

Error message:
"The from_engine() method on Inspector is deprecated and will be removed
in a future release.  Please use the sqlalchemy.inspect() function on an
Engine or Connection in order to acquire an Inspector. (deprecated
since: 1.4)"

Minimum version of SQLAlchemy required is bumped to 1.4.23.

Change-Id: I6cf5944ccb3a0532cbf123ddc0d7df6b6de80af1
Closes-Bug: #1943155
2021-09-23 13:41:50 +00:00
elajkat
781edc8f64 req: Bump some dependencies
Neutron's lower-constraint job started to fail and
bump of the following packages seems to solve the issue:
* decorator to 4.1.0
* Mako to 1.0.7

Change-Id: I31d20cc0dc1fc0e745e16718e6c7c8dc896da855
2021-09-17 15:48:59 +00:00
Rodolfo Alonso Hernandez
82f72896db Add pagging and sorting support for "network_ip_availability"
Added pagging and sorting support for the extension
"network_ip_availability".

Closes-Bug: #1940518

Change-Id: Ic520ceb060c4a914d72ef66f58eeaa667382c53b
2021-09-02 16:51:08 +02:00
Zuul
dd46eb69fc Merge "Bump neutron-lib to 2.13.0" 2021-09-02 14:39:44 +00:00
Przemyslaw Szczerbik
31c09cd3b7 Bump os-resource-classes lib to 1.1.0
Newer version provides access to packet rate related resource classes:

* NET_PACKET_RATE_KILOPACKET_PER_SEC
* NET_PACKET_RATE_EGR_KILOPACKET_PER_SEC
* NET_PACKET_RATE_IGR_KILOPACKET_PER_SEC

Related-Bug: #1922237
See-Also: https://review.opendev.org/785236
Change-Id: I505911412fd903d351f39ebb733ef8e872cb16fb
2021-08-24 11:00:22 +02:00
Slawek Kaplonski
5ee9325fcc Bump neutron-lib to 2.13.0
Change-Id: I96100d3f62835d66f6ddf252c7ef638aca1f487b
2021-08-09 07:15:00 +00:00
Przemyslaw Szczerbik
2356f0eb87 Bump oslo.log to version 4.5.0
In this version versionutils were updated for Xena release.

Related-bug: #1922237
Change-Id: I89f52929cec067bbe55b183f5dcdbc64a92805de
2021-08-02 10:59:32 +02:00
Przemyslaw Szczerbik
26b06d246a Use os-resource-classes lib for resource classes names
The os-resource-classes lib is the official source of the standard
placement resource classes. Currently, the neutron-lib contains a copy
of those constants. However, they are already marked as deprecated and
are going to be removed with next major release.

Related-Bug: #1934256
Change-Id: I33ecd6f32410f9b7ab1e87a6640201ea157bc383
2021-07-07 09:33:54 +02:00
Zuul
8a1fdddc5c Merge "Bump minimal ovsdbapp version to 1.11.0" 2021-06-25 14:34:28 +00:00
LIU Yulong
2ea7d66216 Bump neutron-lib to 2.12.0
Related-bug: #1912460
Change-Id: If86e42c7c56bb0fc571d68818febf54a29a31aa2
2021-06-22 09:43:04 +08:00
Ihar Hrachyshka
8954b33576 Bump minimal ovsdbapp version to 1.11.0
This is to make sure stateless-security-groups API extension works
for OVN. (The new ovsdbapp version contains support for
allow-stateless ACL verb.)

Change-Id: I812b7e8669bf1ef7b30a3670612d14bc65a93190
2021-06-17 21:32:47 -04:00
Zuul
87fd945119 Merge "Bump os-ken to 2.0.0" 2021-06-11 01:15:48 +00:00
Zuul
fd80100437 Merge "Remove "mitogen" library installation from "docs" job" 2021-06-10 18:13:50 +00:00
Rodolfo Alonso Hernandez
e3bb98c7e7 Bump os-ken to 2.0.0
That will avoid problems with eventlet 0.31.0 version, as seen during
the requirements upgrade.

Change-Id: I9a6798a6b0438149af8190dc90c70f79735bb01d
Closes-Bug: #1930195
2021-06-10 14:45:58 +00:00
Zuul
b7299c1571 Merge "Bump alembic to 1.6.5" 2021-06-09 15:06:09 +00:00
Rodolfo Alonso Hernandez
a660f77d38 Remove "mitogen" library installation from "docs" job
Since pyroute 0.6.2, this dependency is not needed anymore. The
pyroute version is bumped both in requirements and doc/requirements.

This patch bumps the pyroute2 version to 0.6.4 (newest version
provided in upper-requirements).

Change-Id: I627e902e32fe59c6829c3bc92af19abff4b70f9a
Related-Bug: #1928913
2021-06-07 12:39:28 +00:00
Rodolfo Alonso Hernandez
6afdff8494 Bump lower version of evenlet to 0.25.1
That fixes the lower-constraints job with pyroute >=0.6.2.

Change-Id: I849d777903b10a809947f0564205deb73e668c3c
Closes-Bug: #1931098
2021-06-07 12:38:27 +00:00
Rodolfo Alonso Hernandez
c915b93e76 Bump alembic to 1.6.5
This version fixes the problem reported in LP#1929518 as described
in [1].

[1]acc82bff39

Change-Id: I894eb3524681a3abaca5eeca0aa47028e7f1ff44
Closes-Bug: #1929518
2021-06-07 08:23:18 +00:00