Commit Graph

534 Commits

Author SHA1 Message Date
Zuul 135cfa3215 Merge "Ensure [designate] url is a valid URI" 2024-04-23 05:31:28 +00:00
Takashi Kajinami 3bbf259a4e Ensure [designate] url is a valid URI
... using the native URIOpt in oslo.config.

Change-Id: I2753ce0bccbb2607327137d6c1bbc0c2a3276f34
2024-04-22 14:08:06 +09:00
Takashi Kajinami a6e57754e0 Use native IntOpt for overlay_ip_version
The IntOpt class supports choices argument since oslo.config 9.4.0[1].

[1] 83bbc0df4316e8a17b8417d02c80cd0cf5a8568e

Change-Id: I27b825d7b65b6c40692785b50c8a8ccc3ca80b73
2024-04-08 15:04:15 +09:00
Takashi Kajinami 446a7acf2c Add metadata options to generated ovn_agent.ini
The ovn-agent process now loads these options for metadata extension.

Change-Id: I3fcacc9d54e34746fd0ef55f5f74c9f4bd6fbf97
2024-03-16 16:32:32 +09:00
Slawek Kaplonski a644b3c62b [S-RBAC] Change policies for port's binding:profile field
According to the neutron API-REF [1] port's "binding:profile" field is
intended to be used for the "machine-machine communication for compute
services like Nova, Ironic or Zun to pass information to a Neutron
back-end." so it should be by allowed only for the users with the
SERVICE role granted, not even for ADMIN.
This patch updates that policies to be available only for SERVICE role
when new, secure RBAC policies are enabled.

Additionally this patch updates some policies for create, update and get
port APIs to make them all work in the same way and allow them for the
SERVICE users too.

Finally this new policy for create/update_port:binding:profile have to
be overwritten in the fullstack tests to be allowed also for admin user.
It is done by adding custom policy file for the fullstack tests only.

[1] https://docs.openstack.org/api-ref/network/v2/index.html#create-port

Closes-Bug: #2052937
Change-Id: I5c0094ff21439fe8977cfc623789a09067e6a895
2024-02-16 16:10:43 +01:00
Zuul 267690b505 Merge "Set minumum boundary for workers" 2024-02-13 01:03:40 +00:00
Zuul 558fc96bdd Merge "Completely disable rpc workers when rpc_workers=0" 2024-02-12 21:03:08 +00:00
Takashi Kajinami 5def8e9306 Fix a typo in parameter description
TrivialFix

Change-Id: I6f95bb1652f27fbadb343451aa3a1534a43e5c43
2024-02-12 23:17:49 +09:00
Takashi Kajinami 78e8f1dca0 Set minumum boundary for workers
api_workers=0 does not disable api workers but neutron-server still
launches one api worker. Rejecting 0 helps user notice that the value
they request in config files is not honored.

Also the other rpc workers options disable the corresponding workers
completely by setting these options to 0, so setting negative values
work but does not bring any special benefit.

Change-Id: Iac16b241c71ac1068c6fbea3cc792b74bfc66c03
2024-02-12 06:28:23 +00:00
Takashi Kajinami b38f72b212 Completely disable rpc workers when rpc_workers=0
Currently at least 1 rpc worker is launched even when a user requests
zero workers by setting rpc_workers=0. The setting of rpc_workers=0 is
used when ml2-ovn plugin is used without any additional agent, and in
this deployment pattern the single rpc worker is not at all used.

This change ensures no rpc worker is launched when rpc_workers options
is explicitly set to 0. This may be classified as a breaking change,
but is consistent with the earlier change[1] for rpc_workers=0.

[1] 3e1e2d63b3

Closes-Bug: #2052484
Change-Id: I878e50c3192ecd3b145ded0ab8394845a089696e
2024-02-12 06:28:07 +00:00
Zuul d34c1f916f Merge "Remove deprecated OVN vif_type config option" 2024-01-15 12:45:52 +00:00
Brian Haley 4007cfa956 Remove deprecated OVN vif_type config option
This config option was originally introduced before
the networking-ovn merge into neutron in 2019, and as
there is no usage it can be safely removed.

TrivialFix

Change-Id: I8ac826926dc8d3881ee57dc677f41bdbed00e5c0
2024-01-10 16:19:18 -05:00
Brian Haley 712d000a7e Remove deprecated name quota_rbac_entry
This deprecated name for quota_rbac_policy was
introduced before 2016, and as there is no usage
according to codesearch it can be safely removed.

TrivialFix

Change-Id: I5cc3392985ee595999a5030e6b9c80a4c3009187
2024-01-10 16:16:16 -05:00
Lucas Alvares Gomes 114ca0f1be Fix IGMP inconsistency across drivers
Prior to this patch, ML2/OVS and ML2/OVN had inconsistent IGMP
configurations. Neutron only exposed one configuration option for IGMP:
igmp_snooping_enabled.

Other features such as IGMP flood, IGMP flood reports and IGMP flood
unregistered were hardcoded differently on each driver (see LP#2044272
for a more details).

These hardcoded values has led to many changes over the years tweaking
them to work on different scenarios but they were never final because
the fix for one case would break the other.

This patch introduces 3 new configuration options for these other IGMP
features that can be enabled or disabled on both backends. Operators
can now fine tune their deployments in the way that will work for them.

As a consequence of the hardcoded values for each driver we had to break
some defaults and, in the case of ML2/OVS, if operators want to keep
things as they were before this patch they will need to enable the new
mcast_flood and mcast_flood_unregistered configuration options.

That said, the for ML2/OVS there was also an inconsistency with the help
string of igmp_snooping_enabled configuration option as it mentioned
that enabling snooping would disable flooding to unregistered ports but
that was not true anymore after the fix [0].

[0] https://bugs.launchpad.net/neutron/+bug/1884723

Closes-Bug: #2044272
Change-Id: Ic4dde46aa0ea2b03362329c87341c83b24d32176
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2023-12-15 09:05:19 +00:00
Zuul dcccd7cabe Merge "Remove vnic_type_blacklist deprecated name" 2023-12-13 07:48:04 +00:00
Zuul 0bb22b355e Merge "[OVN] Add baremetal support without Neutron DHCP agent for IPv6" 2023-12-12 03:32:18 +00:00
Zuul 82994ad8b1 Merge "Add a new option to enable signals" 2023-12-08 18:32:12 +00:00
Zuul fd98ee34e1 Merge "Add support for OVN MAC_Binding aging" 2023-12-02 01:24:41 +00:00
Zuul 420ad91bcb Merge "Remove ovs_integration_bridge configuration option" 2023-12-01 18:20:23 +00:00
Zuul 5b9a47207a Merge "Remove agent veth_mtu configuration option" 2023-12-01 11:27:23 +00:00
Zuul 9fc1aeed14 Merge "Remove ovn_l3_mode configuration option" 2023-12-01 01:48:43 +00:00
Zuul 36e49c5e01 Merge "Replace network type names by constants" 2023-12-01 01:19:55 +00:00
Slawek Kaplonski 034fcb0f6d [OVN] Add baremetal support without Neutron DHCP agent for IPv6
Support for the required DHCPv6 options was recently added in core
OVN with [1].
This patch adds support for that in ML2/OVN backend also and by that
closing one of the gaps between ML2/OVN and ML2/OVS backends.

This patch also adds upgrade check to check used ovn version and warn
operators if native OVN DHCP is used for BM provisioning and OVN version
is older than 23.06.0.
Unfortunately there is no easy way to check used version of OVN so check
relies on the ovnnb schema version.

[1] c5fd51bd15

Closes-Bug: #2030520
Change-Id: Iaa3ff8e97021e44f352e5a9a370714bf5f1d77b8
2023-11-29 09:36:27 +01:00
Zuul fce1b4c7d7 Merge "Validate ip versions" 2023-11-28 23:42:31 +00:00
Zuul 3fe1261a80 Merge "Add [metadata_rate_limiting] options to example config files" 2023-11-28 23:40:42 +00:00
Brian Haley 62982a1ff4 Remove vnic_type_blacklist deprecated name
This was replaced a number of releases ago by the more
inclusive name 'vnic_type_prohibit_list', and is not used
anywhere in the tree.

Change-Id: Ifbe9f4cd0c291ab61e0adb93cfde866001086345
2023-11-28 10:18:19 +00:00
Takashi Kajinami 47d140d4d0 Replace network type names by constants
Each network type name is defined as a constant in neutron-lib. This
replaces the remaining string by the common constants.

This change ignores tests code because updating all test code brings
little gain while it touches huge number of lines.

Change-Id: I26ee715209d7d3f12c39c9e05d4fb9953b9b9537
2023-11-28 16:06:13 +09:00
Takashi Kajinami ed07a430f5 Validate ip versions
This ensures that options taking ip versions accept only valid version
numbers (4 or 6).

Change-Id: I284360f8c9aee5e9fc4ebddd8f9a33f01ec06571
2023-11-28 01:21:23 +00:00
Takashi Kajinami d8a2f212f7 Add [metadata_rate_limiting] options to example config files
The metadata_rate_limiting options were added during the previous
cycles[1] but these options were not added to the oslo.config entry
points thus are still missing from the example config files.

This change adds these options to the appropriate entry points so that
the options are picked up by oslo-config-generator.

These options were previously registered by metadata-agent which are
not using these options really. This change also removes that useless
registration.

[1] 5f4a41326d

Closes-Bug: #2044896
Change-Id: Ib4bea51e24063c275737cdd769ad07c621a845f6
2023-11-28 10:20:35 +09:00
Zuul ecb24ff62d Merge "Remove segment_mtu configuration option" 2023-11-27 10:16:26 +00:00
Brian Haley 1c13fb03d1 Remove ovs_integration_bridge configuration option
This option has been marked deprecated since Ussuri
as it is a duplicate of OVS:integration_bridge, let's
remove it.

TrivialFix

Change-Id: I81bc5f3d98f752d926a243cbd17b8b894f2bdf58
2023-11-23 07:06:53 +00:00
Brian Haley 241eb143f4 Remove segment_mtu configuration option
The segment_mtu option was replaced with global_physnet_mtu
back in Mitaka, let's remove it as it's unused anywhere.

TrivialFix

Change-Id: Ib6e3ff7da700c2b312c7071734d0a5d498238eff
2023-11-21 16:44:36 -05:00
Brian Haley 0dcebba676 Remove agent veth_mtu configuration option
The ``[agent] veth_mtu`` has been deprecated since Wallaby
and is not used anywhere.

TrivialFix

Change-Id: I170cb2348910179b1b264bad2effc6f5015a27fa
2023-11-21 16:39:17 -05:00
Terry Wilson 0a554b4f29 Add support for OVN MAC_Binding aging
OVN added support for aging out MAC_Binding entries [1][2].
Without this feature, the MAC_Bindings table can grow indefinitely.

[1] 1a947dd307
[2] cecac71c0e

Closes-Bug: 2033932
Change-Id: I91070ad6addb30ffdedba5d561984d2f6626e2b7
2023-11-21 12:03:15 -06:00
Zuul cbca72195a Merge "docs: update default value of metadata workers for ml2/ovn" 2023-11-21 08:19:29 +00:00
Zuul d853996d87 Merge "Remove deprecated [designate] admin_* parameters" 2023-11-20 21:24:27 +00:00
Brian Haley 56663edb20 Remove ovn_l3_mode configuration option
This has actually never been used, it just migrated over
when the networking-ovn was integrated.

TrivialFix

Change-Id: I384a6f05e9fa08f419b82111639345aecede19df
2023-11-20 15:16:22 -05:00
Bartosz Bezak 407585f99f docs: update default value of metadata workers for ml2/ovn
[1] changed that value to 0

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

Related-Bug: #1993181
Change-Id: I7009e8a9fa8a61cc796d9592db0cf68e07e5884d
2023-11-17 10:40:12 +01:00
Takashi Kajinami a555a274e6 Validate [designate] ipvN_ptr_zone_prefix_size at config layer
This change re-implements validation of ipvN_ptr_zone_prefix_size at
config definition layer. This brings a few benefits.
 - The validation is executed at an earlier stage
 - The validation can be leveraged by the oslo-config-validator.

Change-Id: Ib72109bcb537b3e44719efb6f33ea46f0d45a1ef
2023-11-05 14:15:29 +09:00
Takashi Kajinami 46c1220b38 Remove deprecated [designate] admin_* parameters
These were deprecated during Xena cycle[1], so can be removed now.

[1] adfd853267

Related-Bug: #1927494
Change-Id: I9fadaa6cfcd66409da47422505c145d9d67f6b8c
2023-11-04 22:47:55 +09:00
Luis Tomas Bolivar 1e9f50c736 Add support for FDB aging
In [1] we added support for FDB learning. In order to avoid issues
due to that table increasing without limits, which will impact OVN
performance, this patch is adding support for its aging mechanisms
which was added in OVN 23.09 in [2]. By default is disabled, so if
`localnet_learn_fdb` is enabled, the new configuration parameters
should be appropriately configured too: `fdb_age_threshold` and
`fdb_removal_limit`

[1] https://review.opendev.org/c/openstack/neutron/+/877675
[2] ae9a548882

Closes-Bug: 2035325

Change-Id: Ifdfaec35cc6b52040487a2b5ee08aba9282fc68b
2023-10-24 08:25:03 +00:00
Zuul 55c20cdf1a Merge "Add policy enforcer for "tags" service plugin" 2023-10-19 00:44:07 +00:00
Rodolfo Alonso Hernandez f9b91289a5 Add policy enforcer for "tags" service plugin
The following resources have been updated with new policies for
tags:
* Port
* Subnet
* Network
* Router
* FloatingIP
* NetworkSegmentRange
* NetworkSegment
* SecurityGroup
* Trunk
* Subnetpool

The admin can now enforce specific policies for the resource tags
for the creation, update and deletion actions.

NOTE: a follow-up patch, with a new Launchpad bug reference, will
      be created to move the ``Tagging`` class from
      ``ExtensionDescriptor`` to ``APIExtensionDescriptor``, and
      refactor the ``TaggingController`` to be a standard
      ``neutron.api.v2.base.Controller``. Any API resource using
      the second controller will use the path used by the wsgi
      hooks, in particular the policy hook. That will make unnecessary
      to manually call the ``policy.enforce`` method from the
      extension class methods.

Closes-Bug: #2037002
Change-Id: I9f3e032739824f268db74c5a1b4f04d353742dbd
2023-10-14 15:41:06 +00:00
Jakub Libosvar 4e566b11d0 Introduce ovn_nb_global config section
The patch introduces a new config section ovn_nb_global. All options
from this section are passed to OVN Northbound NB_Global table to
configure Northbound OVN.

First option is ignore_lsp_down to override OVN default configuration.
This option was changed in OVN to `true` [1] but for Neutron it's better
to not answer ARP packets when ports are in DOWN status.

[1] https://www.mail-archive.com/ovs-dev@openvswitch.org/msg60064.html

Change-Id: I478249cae483fd2540a7ff3ab714e3d9c3e13f17
Signed-off-by: Jakub Libosvar <libosvar@redhat.com>
2023-10-13 16:56:24 +00:00
Zuul 49709cacd6 Merge "Create a policy rule to control if a rule belongs to the default SG" 2023-10-11 12:47:03 +00:00
Rodolfo Alonso Hernandez 96223931ca Create a policy rule to control if a rule belongs to the default SG
The policy rule ``shared_security_group`` allows to create new policy
rules checking if a security group rule belongs or not to the project
default security group.

By default the behaviour has not changed. If an administrator wants
to prevent a non-privileged user from creating or deleting rules in the
default security group, the ``create_security_group_rule`` and
``delete_security_group_rule`` can be overriden. An example is provided
in the unit tests.

Closes-Bug: #2019960

Change-Id: I6c90b61df0e726ef07f177801069baf30c49de67
2023-10-09 14:11:55 +00:00
Rodolfo Alonso Hernandez 294e1c60b4 [RBAC] Update the subnet policies
* get_subnet: the network owner can retrieve the subnet too.
* update_subnet: any project member can update the subnet.
* delete_subnet: any project member can delete the subnet.

Closes-Bug: #2038646
Change-Id: Iae2e3a31eb65d68dc0d3d0f9dd9fc8cf83260769
2023-10-09 08:04:30 +00:00
Slawek Kaplonski 428f7a8418 [S-RBAC] Add service role in neutron policy
RBAC community wide goal phase-2[1] is to add service
role for the service APIs policy rule.
This patch adds new "service_api" role in policies, deprecates old rule
"context_is_advsvc" as this had basically same goal but for consistency
reasons we want now to have it named "service_api" as in other policies
for other projects.
This patch also adds unit tests to ensure what is allowed and what is
forbidden for the service role user.

[1] https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html#phase-2

Closes-Bug: #2026182

Change-Id: Iaa1a3a491d310c2304f6500c6e5d2b9c31a72fa8
2023-10-06 07:55:05 +00:00
Arnaud Morin 878ea0dfd5 Add a new option to enable signals
When running behind a wsgi server like apache/mod_wsgi, neutron should
not register on Signals, it will overlap with the Signals registered by
the wsgi server.

Related-Bug: #2021814

Change-Id: I3c74846a8337d019f1ab6759ebb03f18c3f00238
Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
2023-09-26 12:49:50 +00:00
Zuul 977461f92b Merge "Add max limit to agent_down_time" 2023-08-22 10:05:43 +00:00