Add deprecation warning for the OVN Metadata agent

The OVN Metadata agent is deprecated in favor of the OVN Agent with
metadata extension.

Related-Bug: #2112313
Change-Id: Ibdde91c963b1f75b0f177dae5690d50f30160018
Signed-off-by: Rodolfo Alonso Hernandez <ralonsoh@redhat.com>
This commit is contained in:
Rodolfo Alonso Hernandez
2025-06-11 06:05:34 +00:00
committed by Rodolfo Alonso
parent ac1280b29c
commit 9873303dc2
3 changed files with 37 additions and 0 deletions

View File

@@ -42,6 +42,9 @@ agent configuration file in the "extensions" parameter:
extensions = metadata
In ``devstack``, the ``[agent]extensions`` configuration parameter is set by
``OVN_AGENT_EXTENSIONS``.
Each extension will inherit from ``OVNAgentExtension``, which provides the API
for an OVN agent extension. The extensions are loaded in two steps:
@@ -73,3 +76,18 @@ for new events that will trigger actions. As mentioned in the previous section,
each extension will subscribe to a set of events from the OVN and OVS
databases; these events will trigger a set of actions executed on the OVN
agent.
Zuul CI testing
---------------
In order to enable this new agent, it is needed:
* To disable the default OVN Metadata agent (devstack service
``q-ovn-metadata-agent``).
* To enable the OVN agent (devstack service ``q-ovn-agent``).
Check the Neutron CI job ``neutron-tempest-plugin-ovn`` definition and
`[OVN] Use the OVN agent in "neutron-tempest-plugin-ovn"
<https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/909860>`_
for more information.

View File

@@ -492,6 +492,10 @@ class MetadataAgent:
self._update_chassis_private_config()
self._update_metadata_sb_cfg_key()
LOG.warning(
'The OVN Metadata agent is deprecated in favor of the OVN agent '
'with the metadata extension. It has been deprecated in 2025.2 '
'and will be removed in 2026.2')
self._proxy.wait()
@ovn_utils.retry()

View File

@@ -0,0 +1,15 @@
---
deprecations:
- |
The OVN Metadata agent is deprecated in favor of the `OVN agent
<https://docs.openstack.org/neutron/latest/ovn/ovn_agent.html>`_. In order
to replace the the first with the second one, it is only needed to stop
the OVN Metadata agent and start the OVN agent with the "metadata"
plugable extension enabled. The OVN agent allows plugable extensions, like
for example "metadata", that can be enabled or disabled `via the
configuration file
<https://docs.openstack.org/neutron/latest/ovn/ovn_agent.html#plugable-extensions>`_.
Apart from the ``[DEFAULT]extensions`` configuration parameter required
in the OVN agent, the rest of the configuration is the same. Thus the new
agent can use the old configuration files by just adding the the "metadata"
plugable extension.