Commit Graph

462 Commits

Author SHA1 Message Date
Rodolfo Alonso Hernandez fe31f4fe02 [OVN] Implement OVN agent metadata extension
This patch is implementing the OVN agent metadata extension, by reusing
the OVN metadata class. The class ``MetadataAgent`` is inherited in the
``MetadataExtension`` class. The goal is to use the same code in both
implementations (until the OVN metadata agent is deprecated).

The OVN agent metadata extension has a different initialization
process. The OVN and OVS IDL connections are created during the
extension initialization but are not accessible. The ``start`` method
is used to load the configuration, execute the sync process and
register the metadata extension.

This extension will replace the need of the OVN metadata agent. The
deprecation of this agent will imply the refactor of the existing code
that now is shared between both agents.

This new OVN agent will be tested in the "neutron-tempest-plugin-ovn"
CI job, after the change done in the following patch.

Needed-By: https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/909860

Partial-Bug: #2017871
Change-Id: I4381a67648a9b6198a8d936db784964d74dc87a1
2024-03-05 16:44:34 +00:00
Ghanshyam Mann 4d9482d8ec Update python classifier in setup.cfg
As per the current release tested runtime, we test
python version from 3.8 to 3.11 so updating the
same in python classifier in setup.cfg

Change-Id: I3c5badcc6293840efe52b6d03e5ed990d9f3e8a9
2024-01-09 19:04:32 -08:00
Rodolfo Alonso Hernandez 80f547ad1d Add a "port" child table "porthardwareoffloadtype"
This table has a 1:1 relationship with the "port" table, providing
the "hardware_offload_type" field (string).

The "neutron-lib" library minimum version is 3.8.0, that contains
[1].

NOTE: once the OSC patch is merged [2], the documentation will be
updated to reflect how to create a hardware offloaded port without
manually defining the port binding profile,

[1]https://review.opendev.org/c/openstack/neutron-lib/+/882726
[2]https://review.opendev.org/c/openstack/python-openstackclient/+/892792

Partial-Bug: #2013228
Change-Id: I04f232d6c43e39f254c4559caf041dcf05acec21
2023-08-19 06:08:51 +00:00
likui 1954290636 Add python3.10 support in testing runtime
In 2023.2 cycle testing runtime, project test in py38 py39 and py10

[1] https://governance.openstack.org/tc/reference/runtimes/2023.2.html

Change-Id: Ie4745e0b6eacf4acfe4dc811fab07041b8f068eb
2023-08-02 14:00:15 +08:00
Zuul fc5634371e Merge "port-hint-ovs-tx-steering: shim extension" 2023-05-22 12:23:25 +00:00
Brian Haley 01af4b2cda Remove the neutron-debug tool
With removal of the neutron client shell code this tool is
no longer usable. It had been marked for deprecation since
the Newton (9.0) cycle and unmaintained.

This code is also breaking the neutron gate pep8 job.

Change-Id: I3c0c93de0b860d9287019b7834cb8337d9668cc0
2023-05-12 12:42:31 -04:00
Bence Romsics 97d658c4ce port-hint-ovs-tx-steering: shim extension
and a ML2 extension that does nothing, just loads the API extension.
All the real implementation is in the agent-side change.

To enable this:

* ml2_conf.ini:
  [ml2]
  extension_drivers += port_hint_ovs_tx_steering

Change-Id: I572072b3817484129a60ef68adf74ffd52b9eab8
Closes-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/+/873112
2023-05-09 11:49:17 +02: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
yatin 2cafe0a9c4 Revert "Move to python3.9 as minimal python version"
This reverts commit f93c9be1c1.

Reason for revert: tooz bump is reverted with [1] and that unblocks
py38 jobs, other projects still rely on py38 for some functions and
neutron due to py39 constraints fails to install there. Until next
steps are clear for py38 support in 2023.2 let's revert.

[1] https://review.opendev.org/c/openstack/requirements/+/881329
Change-Id: Ibf6e4bb784c6e26a2e413e45ccc2e8e5269fd562
Related-Bug: #2017478
2023-04-25 04:25:57 +00:00
yatinkarel f93c9be1c1 Move to python3.9 as minimal python version
2023.2 release is targetting python3.9 as
minimal testing rutime[1]. openstack-tox-py38
job started to fail as libraries(like tooz) already
dropped py3.8 support.

This patch updates neutron py3 override job template
and setup.cfg to reflect the same.

[1] https://review.opendev.org/c/openstack/governance/+/872232

Closes-Bug: #2017478
Change-Id: I3ebbbd46a284b2f96172a90427b355f3ccd0c098
2023-04-24 12:21:21 +05:30
Rodolfo Alonso Hernandez c8ccf2ffbb [OVN] Change oslo config options entry point for the OVN agent
The correct value, as defined in the namespace of the oslo config file,
is "neutron.ml2.ovn.agent".

Closes-Bug: #2009678
Change-Id: I1024c6248a2f98555109c1a305c35ea11ae69b51
2023-03-07 19:21:01 +01:00
Rodolfo Alonso Hernandez 54eff20a72 [OVN] New OVN Neutron Agent extension: QoS for HWOL
Added a new OVN Neutron Agent extension: QoS for hardware offloaded
ports. This extension will enforce the minimum bandwidth and maximum
bandwidth egress QoS rules for ports with hardware offload (DevLink
ports).

This extension uses the "ip-link" commands to set the "ceil" and
"rate" parameters on the corresponding virtual functions.

Related-Bug: #1998608
Change-Id: Id436e43868fa0d3fbc843adb55f333582ed0134f
2023-02-02 07:17:22 +00:00
Rodolfo Alonso Hernandez d0c7bb653a [OVN] Implementation of OVN Neutron Agent
This patch implements the OVN Neutron Agent executable, the extension
manager engine, the agent extension abstract class and the configuration
section.

Related-Bug: #1998608
Change-Id: I94bb98217e03f9ac314cb9723da277a23368649c
2023-01-26 07:41:38 +01:00
Zuul ad742401b7 Merge "Fix missing [designate] options" 2022-11-25 09:07:33 +00:00
Takashi Kajinami 67bd2badc9 Fix missing [designate] options
This change ensures the [designate] options, which is used by
the designate external DNS driver, are rendered into neutron.conf
generated by oslo-config-generator.

Change-Id: I56a1079fbfc044532aee64f4fbdec50d9524a580
2022-11-22 12:00:50 +09:00
Michal Arbet c871135cdd Remove xenapi from neutron ml2 config opts
This patch just remove xenapi from setup.cfg
as it has been already removed in [1].

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

Change-Id: I7d651c129bb9468ddcc344ddec66184e5cc1c5fa
2022-10-19 09:57:04 +02:00
Rodolfo Alonso Hernandez c5b76a8393 Script to remove duplicated port bindings
A new script to remove the duplicated port bindings was added. This
script will list all ``ml2_port_bindings`` records in the database,
finding those ones with the same port ID. Then the script removes
those ones with status=INACTIVE. This script is useful to remove
those leftovers that remain in the database after a failed live
migration.

"dry_run" mode is possible if selected in "[cli_script] dry_run"
boolean config option. The duplicated port bindings are printed in
the shell but not deleted.

Related-Bug: #1979072

Change-Id: I0de5fbb70eb852f82bd311616557985d1ce89bbf
2022-08-18 08:13:56 +00:00
Miguel Lavalle 7f0413c84c Implement experimental features framework
During the Zed PTG it was decided to handle unsupported features in
Neutron as experimental. See section titled "When we say something is
not supported?", day 2 in [1]. The agreement was:

"We keep existing jobs for linuxbridge driver for example, but when the
tests start to fail we skip them and finally we stop the job also.
To make it clear for operators we add warning logs highlighting that the
given feature/driver is experimental, and introduce cfg option to enable
such features explicitly."

This commit implements this agreement, initially with Linuxbridge

Depends-On: https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/845646

[1] https://lists.openstack.org/pipermail/openstack-discuss/2022-April/028164.html

Change-Id: Ib18efa3f472736b58c8967847b1061da0e3897d7
2022-06-30 17:59:49 -05:00
likui cbb4c2274a Drop python3.6/3.7 support in testing runtime
In Zed cycle testing runtime, we are targetting to drop the
python 3.6/3.7 support, project started adding python 3.8 as minimum,

[1] https://governance.openstack.org/tc/reference/runtimes/zed.html

Change-Id: Ia04aa9196689c52aff870d3a60fb74fdad81bb26
2022-05-12 17:39:39 +08:00
labedz dcbc4beb9e Use monkey_patch for neutron API server.
Neutron API server was not using eventlet monkey patch
thus eventlet threads couldn't be properly yielded.

This patch set API neutron server like other monkey patched
neutron services: neutron-server and neutron-rpc-server.

NOTE: this change needs apache service restart. Apache
mod_wsgi auto reload can lead to SSL RecursionError.

Co-Authored-By: Szymon Wroblewski <szymon.wroblewski@ovhcloud.com>
Closes-Bug: 1970216
Change-Id: Ib62c049cc521a548ab7e7e9584b19bdaa67b1c9d
2022-04-28 13:34:36 +00:00
Yang JianFeng 9b27020a65 [Agent Side] L3 router support ndp proxy
The agent side codes need consider three scenarios:
1. Non-dvr router. The all related rules are applied in
   qrouter-namespace
2. Dvr router with the local agent mode is dvr_no_external.
   The all related rules are applied in snat-namespace.
3. Dvr router with the local agent mode is dvr. In this scenario,
   The all related rules are applied in fip-namespace.

Change-Id: Ie8729586d318be4a673858021a0116e09e193522
Partial-Bug: #1877301
2022-02-25 12:42:13 +08:00
Zuul 1df18a885e Merge "Updating python testing as per Yoga testing runtime" 2022-02-15 13:54:32 +00:00
Zuul f5030b0bc2 Merge "Add local_ip entrypoints" 2022-02-04 08:15:53 +00:00
Nurmatov Mamatisa 1c3d90e3da Add local_ip entrypoints
Added local_ip entrypoints in setup.cfg neutron.objects

Change-Id: I676c7d19956b963ddeba0d281716324f19930ed2
2022-02-03 12:43:41 +03:00
Yang JianFeng a0a25cb15c [Server Side] L3 router support ndp proxy
Change-Id: I9b92702af8a235443a2fa1aea3997f3d40a03fc3
Partial-Bug: #1877301
2022-02-03 10:07:46 +08:00
Ghanshyam Mann f9b1882380 Updating python testing as per Yoga testing runtime
Yoga testing runtime[1] has been updated to add py39
testing as voting and as we are testing py3.6 and py3.9
we do not need to test py3.7|8 explicitly. Unit tests update are
handled by the job template change in openstack-zuul-job

- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/820286

this commit makes other required changes in zuul.yaml and
update the classifier in setup.cfg file.

[1] https://governance.openstack.org/tc/reference/runtimes/yoga.html

Change-Id: Ia66475b377c683b115c8bd9a77c72d955db60fdc
2021-12-14 02:13:45 +00:00
Zuul 9c74059c60 Merge "Add Local IP L2 extension skeleton" 2021-11-30 19:07:48 +00:00
Zuul b4dd7003db Merge "Add Local IP Extension and DB" 2021-11-17 20:50:43 +00:00
Oleg Bondarev 1222962767 Add Local IP L2 extension skeleton
OVS agent part of Local IP feature was divided into
2 parts to make it easier for reviewers:

1. This patch adds agent extension skeleton and sets
server <-> agent RPC communication mechanism via
push notifications of LocalIPAssociation objects
create/delete. It also shows how the extension would
treat those changes. It may be called extension "frontend".

2. Agent extension flows patch (next one) - deals with OVS
flows and can be called extension "backend".

Partial-Bug: #1930200
Change-Id: I31cb4062b6a21b71c739ab202c60aa7002e4d36e
2021-11-11 10:25:27 +03:00
Oleg Bondarev cd1d96863e Add Local IP Extension and DB
This adds Local IP API extension, DB and OVO models, DB mixin,
migration and service plugin.

Partial-Bug: #1930200
Change-Id: I0ab7c5e9bc918f7fad282673ac6e32e1b01985c5
2021-11-11 10:08:23 +03:00
Przemyslaw Szczerbik d699a955cd Sanitize profile column of ml2_port_bindings table in the DB
With the introduction of port-resource-request-groups extension,
format of binding-profile.allocation has changed. Since the DB,
may contain port bindings that were created before the introduction
of the new format, it's necessary to perform upgrade check and
sanitize those rows that are still using an older format.

Partial-Bug: #1922237
See-Also: https://review.opendev.org/785236
Change-Id: I95e9e1bc553ac499d75c9280e45dfea61d135279
2021-10-21 15:17:24 +02:00
Przemyslaw Szczerbik 56044db26d Add API extension for QoS minimum pps rule
This patch implements support for CRUD operations for QoS minimum
packet rate, for example:

DELETE /qos/policies/$POLICY_ID/minimum_packet_rate_rules/$RULE_ID

Placement or dataplane enforcement is not implemented yet.

Partial-Bug: #1922237
See-Also: https://review.opendev.org/785236
Change-Id: Ie994bdab62bab33737f25287e568519c782dea9a
2021-09-29 12:27:30 +02:00
Zuul 86de15d632 Merge "[QoS] Add rule type packet per second (pps)" 2021-08-04 13:30:17 +00:00
Zuul 0411743bb9 Merge "Sanitize MAC addresses" 2021-07-28 14:27:03 +00:00
LIU Yulong 8e30639452 [QoS] Add rule type packet per second (pps)
This patch adds new API extension to QoS service plugin
to allow CURD actions for packet rate limit (packet per
second) rule in Neutron server side.

NOTE: This patch will NOT implement the real functionality
in L2/L3 backend to limit the pps.

Co-Authored-By:  NANALI <lin203@chinaunicom.cn>

Closes-bug: #1912460
Change-Id: Icc88accb88d9cec40c960c56f032c3c27317b42e
2021-07-22 09:53:38 +08:00
Zuul 4952baaf6f Merge "Revert "Config option to enable OVN IDL on other workers"" 2021-07-15 10:27:36 +00:00
Lucas Alvares Gomes e71ba8d2d1 Revert "Config option to enable OVN IDL on other workers"
This reverts commit 66ac943b64.

Reason for revert: After discussions with the core reviewers for ML2/OVN
and Neutron folks about this configuration option we understood that we
should just enable RpcWorkers  to connect to the OVN database by default
and later allow rpc_workers to be set to 0 in Neutron (for those looking
for optimizations and that don't need RpcWorkers in their deployment). So
I am proposing a revert for this configuration option.

Change-Id: I73ba195401fff9f832b84633398816383f710b23
2021-07-14 16:50:06 +01:00
Rodolfo Alonso Hernandez 827cca2ed7 Sanitize MAC addresses
This patch sanitizes the MAC address coming from a user input:
- The "base_mac" address configuration parameter.
- The "port.mac_address" stored in the database, if the script
  provided is not executed.

This patch relays on [1], that will sanitize any input coming from
the server API.

This patch adds a new script to sanitize all "port.mac_address"
registers stored in the dabatabase.

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

Related-Bug: #1926273

Change-Id: I8572906cc435feda1f82263fd94dda47fc1526e1
2021-07-08 16:46:55 +00:00
Zuul 88fed5a286 Merge "Add script to aid in using ovn-trace with OpenStack" 2021-06-26 17:39:24 +00:00
LIU Yulong 56e8498a4d Add agent extension 'dhcp' for ovs agent
Add a new ovs agent extension to support distributed DHCP for
VMs in compute nodes directly. For large scale deployment, this
can be used to reduce the number of neutron agents. Large scale
cloud can benefit from it.

From the perspective of virtual machine, this will reduce the
probability of DHCP request failure. The VMs will get a higher
level availability for DHCP R/R, no single point of failure
permanently. If one host goes down, VMs in other hosts will not
be influnced by it.

For the perspective of network performance, after using this
extension, the DHCP broadcasting packages will be limited
to the host locally.

Partially-Implements: bp/distributed-dhcp-for-ml2-ovs
Closes-Bug: #1900934
Change-Id: Id8a4c501daad7c2185e6d69441182666ef987e61
2021-06-24 08:38:38 +08:00
Zuul 887dc1049c Merge "Config option to enable OVN IDL on other workers" 2021-06-23 20:22:50 +00:00
Zuul e431c09438 Merge "Allow to parse keywords in dns labels" 2021-06-22 13:31:32 +00:00
Bodo Petermann 66ac943b64 Config option to enable OVN IDL on other workers
Add a configuration option to ovn group:
additional_worker_classes_with_ovn_idl
to optionally enable OVN IDL connections on additional workers.
By default the IDL connections are only initialized on API and
maintenance workers as other worker types normally don't need them.
But some plugins or extensions might still require IDL connections on
other workers and now may enable them via configuration, by adding the
worker class (or its alias from neutron.worker_classes) to
additional_worker_classes_with_ovn_idl.

Closes-Bug: #1927977
Change-Id: Ia0d882220cd281e3c91648e3f32a842d61a5f57d
2021-06-22 10:33:11 +02:00
Terry Wilson 028c544b05 Add script to aid in using ovn-trace with OpenStack
This adds a script that allows one to pass in OpenStack objects
to fill in the eth/ip src/dst data when running ovn-trace. e.g.

  $ ml2ovn-trace --from server=vm1 --to server=vm2

or

 $ ml2ovn-trace --from server=vm1 --ip-dst 8.8.8.8 --via router=r1

Change-Id: I05c4eeee8d9cdb8faee2ee2eee166b421482173f
2021-05-20 19:29:26 +00:00
likui 2c192b78a2 setup.cfg: Replace dashes with underscores
Setuptools v54.1.0 introduces a warning that the use of
dash-separated options in 'setup.cfg' will not be supported
in a future version [1].
Get ahead of the issue by replacing the dashes with underscores.
Without this, we see 'UserWarning' messages
like the following on new enough
versions of setuptools:

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Change-Id: I68b247f1abc93df91fd2ece6b7a14c633e27b279
2021-05-12 18:23:20 +08:00
David Vallee Delisle 89fd50d0f9 Adding placement auth options to oslo.config entry_points
To assist with automated configuration validation, we need entry points
for oslo.config.opts for placement auth options.

Change-Id: Ibaaa1600e6a14f3308024c4e22e3489ee21e7244
2021-05-10 09:00:57 -04: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
Rodolfo Alonso Hernandez 8912ea5575 Add port device profile extension
Added a new port extension: device profile (``port_device_profile``).
This extension adds the "device_profile" parameter to the "port" API
and specifies the device profile per port. This parameter is a
string.

This parameter is passed to Nova and Nova retrieves the requested
device profile from Cyborg. Reference:
  https://docs.openstack.org/api-ref/accelerator/v2/index.html#
    device-profiles

For backwards compatibility, this parameter will be "None" by
default.

Closes-Bug: #1906602
Depends-On: https://review.opendev.org/c/openstack/neutron-lib/+/767586

Change-Id: I1202a8388e64ae4270ef4ca118993504ae7c1731
2021-01-22 16:17:30 +00:00
Ghanshyam Mann fe413fe01d [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to do two things:

1. Change the default value of '[oslo_policy] policy_file''
config option from 'policy.json' to 'policy.yaml' with
upgrade checks.

2. Deprecate the JSON formatted policy file on the project side
via warning in doc and releasenotes.

Also replace policy.json to policy.yaml ref from doc and tests.

[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: I0dbb8484e749e645627756e88ec79c1b26a6414a
2021-01-08 09:10:49 +00:00
Rodolfo Alonso Hernandez a217a5d290 Add port NUMA affinity policy
Added a new port extension: NUMA affinity policy. This extension adds
the "numa_affinity_policy" parameter to the "port" API and specifies
the NUMA affinity policy per port.

This parameter is passed to Nova when a virtual machine is created.
Nova will use this information to schedule the virtual machine.

For backwards compatibility, this parameter will be "None" by default.

Depends-On: https://review.opendev.org/#/c/740058/
Closes-Bug: #1886798

Change-Id: Ie3d68c098ddb727ab8333aa1de4064e67a4f00a7
2020-11-13 15:49:34 +00:00