Mark "ipv6_pd_enabled" as deprecated and experimental.

This functionality will be kept in the code as experimental as long
as no bugs are reported againts this feature.

This patch also marks the config option "ipv6_pd_enabled" as
experimental. In order to enable this flag, it is needed to configure
the "experimental.ipv6_pd_enabled" flag too.

Related-Bug: #1916428
Change-Id: I27aeed74f308d5bdf0210e76d9557f95b66c71bf
This commit is contained in:
Rodolfo Alonso Hernandez 2023-03-29 20:41:33 +02:00 committed by Rodolfo Alonso
parent 0b95483106
commit 3e65ef863c
4 changed files with 30 additions and 1 deletions

View File

@ -77,7 +77,12 @@ core_opts = [
"without providing a CIDR or subnetpool ID will be "
"given a CIDR via the Prefix Delegation mechanism. "
"Note that enabling PD will override the behavior of "
"the default IPv6 subnetpool.")),
"the default IPv6 subnetpool."),
deprecated_for_removal=True,
deprecated_since='2023.2',
deprecated_reason=("The Dibbler client used for this feature "
"is no longer maintained. See LP#1916428"),
),
cfg.IntOpt('dhcp_lease_duration', default=86400,
help=_("DHCP lease duration (in seconds). Use -1 to tell "
"dnsmasq to use infinite lease times.")),

View File

@ -17,11 +17,16 @@ from neutron._i18n import _
EXPERIMENTAL_CFG_GROUP = 'experimental'
EXPERIMENTAL_LINUXBRIDGE = 'linuxbridge'
EXPERIMENTAL_IPV6_PD = 'ipv6_pd_enabled'
experimental_opts = [
cfg.BoolOpt(EXPERIMENTAL_LINUXBRIDGE,
default=False,
help=_('Enable execution of the experimental Linuxbridge '
'agent.')),
cfg.BoolOpt(EXPERIMENTAL_IPV6_PD,
default=False,
help=_('Enable execution of the experimental IPv6 Prefix '
'Delegation functionality in the L3 agent.')),
]

View File

@ -51,8 +51,10 @@ from sqlalchemy import not_
from neutron._i18n import _
from neutron.api.rpc.agentnotifiers import l3_rpc_agent_api
from neutron.common import _constants
from neutron.common import experimental
from neutron.common import ipv6_utils
from neutron.common import utils
from neutron.conf import experimental as c_exp
from neutron.db import db_base_plugin_common
from neutron.db import ipam_pluggable_backend
from neutron.db import models_v2
@ -156,7 +158,17 @@ class NeutronDbPluginV2(db_base_plugin_common.DbBasePluginCommon,
result_filters=None)
return super(NeutronDbPluginV2, cls).__new__(cls, *args, **kwargs)
@staticmethod
def _validate_ipv6_pd():
try:
if cfg.CONF.ipv6_pd_enabled:
experimental.validate_experimental_enabled(
c_exp.EXPERIMENTAL_IPV6_PD)
except cfg.NoSuchOptError:
return
def __init__(self):
self._validate_ipv6_pd()
self.set_ipam_backend()
if (cfg.CONF.notify_nova_on_port_status_changes or
cfg.CONF.notify_nova_on_port_data_changes):

View File

@ -0,0 +1,7 @@
---
deprecations:
- |
"ipv6_pd_enabled" has been marked as deprecated and marked as experimental.
To continue using it, deployers have to set to True the "ipv6_pd_enabled"
option in the "experimental" section of neutron.conf. See
`Dibbler project concluded <https://bugs.launchpad.net/neutron/+bug/1916428>`_.