From 9873303dc2509cbe28fa6803a8de3585c937f8b9 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Wed, 11 Jun 2025 06:05:34 +0000 Subject: [PATCH] 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 --- doc/source/ovn/ovn_agent.rst | 18 ++++++++++++++++++ neutron/agent/ovn/metadata/agent.py | 4 ++++ ...ata-agent-deprecation-33d5e5acba902391.yaml | 15 +++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 releasenotes/notes/ovn-metadata-agent-deprecation-33d5e5acba902391.yaml diff --git a/doc/source/ovn/ovn_agent.rst b/doc/source/ovn/ovn_agent.rst index 9a3e28c117e..4e9f592f3ab 100644 --- a/doc/source/ovn/ovn_agent.rst +++ b/doc/source/ovn/ovn_agent.rst @@ -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" +`_ +for more information. diff --git a/neutron/agent/ovn/metadata/agent.py b/neutron/agent/ovn/metadata/agent.py index df58581d8d3..484d9d1ff90 100644 --- a/neutron/agent/ovn/metadata/agent.py +++ b/neutron/agent/ovn/metadata/agent.py @@ -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() diff --git a/releasenotes/notes/ovn-metadata-agent-deprecation-33d5e5acba902391.yaml b/releasenotes/notes/ovn-metadata-agent-deprecation-33d5e5acba902391.yaml new file mode 100644 index 00000000000..be0e8e0b17f --- /dev/null +++ b/releasenotes/notes/ovn-metadata-agent-deprecation-33d5e5acba902391.yaml @@ -0,0 +1,15 @@ +--- +deprecations: + - | + The OVN Metadata agent is deprecated in favor of the `OVN agent + `_. 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 + `_. + 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.