Deprecate the agent framework and drivers

This patch marks the agent framework and drivers as deprecated in the Antelope release for removal in the "C" release.

Please see the announcement on the OpenStack discuss mailing list for more information about the deprecation:
https://lists.openstack.org/pipermail/openstack-discuss/2023-January/031803.html

Change-Id: I3a90243dc323a2815ce7d973a5e52248ed1c2ad6
This commit is contained in:
Michael Johnson 2023-02-05 00:28:23 +00:00
parent 0e58c3d757
commit 63ca389755
18 changed files with 191 additions and 29 deletions

View File

@ -23,6 +23,7 @@
Configured in [service:agent]
"""
import warnings
from oslo_config import cfg
@ -45,6 +46,10 @@ class Service(service.Service):
self.service_name, threads=cfg.CONF['service:agent'].threads
)
warnings.warn('The designate agent service is deprecated as of the '
'Antelope (2023.1) release and will be removed in the '
'"C" release.', DeprecationWarning)
self.dns_service = service.DNSService(
self.dns_application, self.tg,
cfg.CONF['service:agent'].listen,

View File

@ -15,9 +15,12 @@
# under the License.
import abc
from debtcollector import removals
from designate.plugin import DriverPlugin
@removals.removed_class('AgentBackend')
class AgentBackend(DriverPlugin):
"""Base class for backend implementations"""
__plugin_type__ = 'backend'

View File

@ -14,6 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import os
import warnings
import dns
import dns.resolver
@ -33,6 +34,14 @@ class Bind9Backend(base.AgentBackend):
__plugin_name__ = 'bind9'
__backend_status__ = 'untested'
def __init__(self, agent_service):
super(Bind9Backend, self).__init__(agent_service)
warning_msg = ('The designate agent framework and backend driver "{}" '
'are deprecated as of the Antelope (2023.1) release '
'and will be removed in the "C" '
'release.'.format(self.__plugin_name__))
warnings.warn(warning_msg, DeprecationWarning)
def start(self):
LOG.info("Started bind9 backend")

View File

@ -14,6 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import itertools
import warnings
import dns.rdata
import dns.rdataclass
@ -92,6 +93,13 @@ class DenominatorBackend(base.AgentBackend):
def __init__(self, agent_service):
super(DenominatorBackend, self).__init__(agent_service)
warning_msg = ('The designate agent framework and backend driver "{}" '
'are deprecated as of the Antelope (2023.1) release '
'and will be removed in the "C" '
'release.'.format(self.__plugin_name__))
warnings.warn(warning_msg, DeprecationWarning)
self.denominator = Denominator(
cfg.CONF[CFG_GROUP_NAME])

View File

@ -43,6 +43,7 @@ import glob
import os
import random
import tempfile
import warnings
import dns
import dns.resolver
@ -94,6 +95,13 @@ class DjbdnsBackend(base.AgentBackend):
def __init__(self, *a, **kw):
"""Configure the backend"""
super(DjbdnsBackend, self).__init__(*a, **kw)
warning_msg = ('The designate agent framework and backend driver "{}" '
'are deprecated as of the Antelope (2023.1) release '
'and will be removed in the "C" '
'release.'.format(self.__plugin_name__))
warnings.warn(warning_msg, DeprecationWarning)
conf = cfg.CONF[CFG_GROUP_NAME]
self._resolver = dns.resolver.Resolver(configure=False)

View File

@ -13,6 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import warnings
from oslo_log import log as logging
from designate.backend.agent_backend import base
@ -23,6 +25,14 @@ LOG = logging.getLogger(__name__)
class FakeBackend(base.AgentBackend):
__plugin_name__ = 'fake'
def __init__(self, agent_service):
super(FakeBackend, self).__init__(agent_service)
warning_msg = ('The designate agent framework and backend driver "{}" '
'are deprecated as of the Antelope (2023.1) release '
'and will be removed in the "C" '
'release.'.format(self.__plugin_name__))
warnings.warn(warning_msg, DeprecationWarning)
def start(self):
LOG.info("Started fake backend, Pool Manager will not work!")

View File

@ -42,6 +42,7 @@ import errno
import os
import string
import tempfile
import warnings
import dns
import dns.resolver
@ -85,6 +86,12 @@ class GdnsdBackend(base.AgentBackend):
"""Configure the backend"""
super(GdnsdBackend, self).__init__(*a, **kw)
warning_msg = ('The designate agent framework and backend driver "{}" '
'are deprecated as of the Antelope (2023.1) release '
'and will be removed in the "C" '
'release.'.format(self.__plugin_name__))
warnings.warn(warning_msg, DeprecationWarning)
self._gdnsd_cmd_name = cfg.CONF[CFG_GROUP_NAME].gdnsd_cmd_name
LOG.info("gdnsd command: %r", self._gdnsd_cmd_name)
self._confdir_path = cfg.CONF[CFG_GROUP_NAME].confdir_path

View File

@ -37,6 +37,7 @@ Supported Knot versions: >= 2.1, < 3
Configured in [service:agent:knot2]
"""
import warnings
from oslo_concurrency import lockutils
from oslo_concurrency.processutils import ProcessExecutionError
@ -66,6 +67,12 @@ class Knot2Backend(base.AgentBackend):
"""Configure the backend"""
super(Knot2Backend, self).__init__(*a, **kw)
warning_msg = ('The designate agent framework and backend driver "{}" '
'are deprecated as of the Antelope (2023.1) release '
'and will be removed in the "C" '
'release.'.format(self.__plugin_name__))
warnings.warn(warning_msg, DeprecationWarning)
self._knotc_cmd_name = cfg.CONF[CFG_GROUP_NAME].knotc_cmd_name
def start(self):

View File

@ -14,6 +14,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import warnings
from os_win import constants
from os_win import exceptions as os_win_exc
@ -36,6 +37,12 @@ class MSDNSBackend(base.AgentBackend):
"""Configure the backend"""
super(MSDNSBackend, self).__init__(agent_service)
warning_msg = ('The designate agent framework and backend driver "{}" '
'are deprecated as of the Antelope (2023.1) release '
'and will be removed in the "C" '
'release.'.format(self.__plugin_name__))
warnings.warn(warning_msg, DeprecationWarning)
self._dnsutils = utilsfactory.get_dnsutils()
masters = cfg.CONF['service:agent'].masters

View File

@ -15,6 +15,8 @@
# under the License.
import dns
from debtcollector import removals
"""
backend.private_codes
~~~~~~~~~~~~~~~~~~~~~~
@ -63,6 +65,7 @@ DELETE = 65283
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@removals.removed_class("OpcodeWith14")
class OpcodeWith14(dns.enum.IntEnum):
#: Query
QUERY = 0

View File

@ -14,6 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import sys
import warnings
from oslo_log import log as logging
from oslo_reports import guru_meditation_report as gmr
@ -35,6 +36,10 @@ def main():
logging.setup(CONF, 'designate')
gmr.TextGuruMeditation.setup_autorun(version)
warnings.warn('The designate agent process is deprecated as of the '
'Antelope (2023.1) release and will be removed in the '
'"C" release.', DeprecationWarning)
server = agent_service.Service()
heartbeat = heartbeat_emitter.get_heartbeat_emitter(server.service_name)
service.serve(server, workers=CONF['service:agent'].workers)

View File

@ -24,27 +24,57 @@ AGENT_GROUP = cfg.OptGroup(
AGENT_OPTS = [
cfg.IntOpt('workers',
help='Number of agent worker processes to spawn'),
help='Number of agent worker processes to spawn',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
cfg.IntOpt('threads', default=1000,
help='Number of agent greenthreads to spawn'),
help='Number of agent greenthreads to spawn',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
cfg.ListOpt('listen',
default=['0.0.0.0:%d' % DEFAULT_AGENT_PORT],
help='Agent host:port pairs to listen on'),
help='Agent host:port pairs to listen on',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
cfg.IntOpt('tcp_backlog', default=100,
help='The Agent TCP Backlog'),
help='The Agent TCP Backlog',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
cfg.FloatOpt('tcp_recv_timeout', default=0.5,
help='Agent TCP Receive Timeout'),
help='Agent TCP Receive Timeout',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
cfg.ListOpt('allow_notify', default=[],
help='List of IP addresses allowed to NOTIFY The Agent'),
help='List of IP addresses allowed to NOTIFY The Agent',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
cfg.ListOpt('masters', default=[],
help='List of masters for the Agent, format ip:port'),
help='List of masters for the Agent, format ip:port',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
cfg.StrOpt('backend_driver', default='bind9',
help='The backend driver to use, e.g. bind9, djbdns, knot2'),
help='The backend driver to use, e.g. bind9, djbdns, knot2',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
cfg.StrOpt('transfer_source',
help='An IP address to be used to fetch zones transferred in'),
help='An IP address to be used to fetch zones transferred in',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
cfg.FloatOpt('notify_delay', default=0.0,
help='Delay after a NOTIFY arrives for a zone that the Agent '
'will pause and drop subsequent NOTIFYs for that zone'),
'will pause and drop subsequent NOTIFYs for that zone',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
]

View File

@ -21,16 +21,37 @@ BIND9_GROUP = cfg.OptGroup(
)
BINS9_OPTS = [
cfg.StrOpt('rndc_host', default='127.0.0.1', help='RNDC Host'),
cfg.IntOpt('rndc_port', default=953, help='RNDC Port'),
cfg.StrOpt('rndc_host', default='127.0.0.1', help='RNDC Host',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
cfg.IntOpt('rndc_port', default=953, help='RNDC Port',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
cfg.StrOpt('rndc_config_file',
help='RNDC Config File'),
cfg.StrOpt('rndc_key_file', help='RNDC Key File'),
cfg.IntOpt('rndc_timeout', default=0, min=0, help='RNDC command timeout'),
help='RNDC Config File',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
cfg.StrOpt('rndc_key_file', help='RNDC Key File',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
cfg.IntOpt('rndc_timeout', default=0, min=0, help='RNDC command timeout',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
cfg.StrOpt('zone_file_path', default='$state_path/zones',
help='Path where zone files are stored'),
help='Path where zone files are stored',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
cfg.StrOpt('query_destination', default='127.0.0.1',
help='Host to query when finding zones'),
help='Host to query when finding zones',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
]

View File

@ -22,9 +22,15 @@ DENOMINATOR_GROUP = cfg.OptGroup(
DENOMINATOR_OPTS = [
cfg.StrOpt('name', default='fake',
help='Name of the affected provider'),
help='Name of the affected provider',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
cfg.StrOpt('config_file', default='/etc/denominator.conf',
help='Path to Denominator configuration file'),
help='Path to Denominator configuration file',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
]

View File

@ -24,25 +24,36 @@ DJDNS_OPTS = [
cfg.StrOpt(
'tcpclient_cmd_name',
help='tcpclient executable path or rootwrap command name',
default='tcpclient'
default='tcpclient', deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'
),
cfg.StrOpt(
'axfr_get_cmd_name',
help='axfr-get executable path or rootwrap command name',
default='axfr-get'
default='axfr-get', deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'
),
cfg.StrOpt(
'tinydns_data_cmd_name',
help='tinydns-data executable path or rootwrap command name',
default='tinydns-data'
default='tinydns-data', deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'
),
cfg.StrOpt(
'tinydns_datadir',
help='TinyDNS data directory',
default='/var/lib/djbdns'
default='/var/lib/djbdns', deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'
),
cfg.StrOpt('query_destination', default='127.0.0.1',
help='Host to query when finding zones'),
help='Host to query when finding zones',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
]

View File

@ -22,12 +22,21 @@ GDNSD_GROUP = cfg.OptGroup(
GDNSD_OPTS = [
cfg.StrOpt('gdnsd_cmd_name',
help='gdnsd executable path or rootwrap command name',
default='gdnsd'),
default='gdnsd',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
cfg.StrOpt('confdir_path',
help='gdnsd configuration directory path',
default='/etc/gdnsd'),
default='/etc/gdnsd',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
cfg.StrOpt('query_destination', default='127.0.0.1',
help='Host to query when finding zones'),
help='Host to query when finding zones',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
]

View File

@ -23,9 +23,15 @@ KNOT2_GROUP = cfg.OptGroup(
KNOT2_OPTS = [
cfg.StrOpt('knotc_cmd_name',
help='knotc executable path or rootwrap command name',
default='knotc'),
default='knotc',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
cfg.StrOpt('query_destination', default='127.0.0.1',
help='Host to query when finding zones'),
help='Host to query when finding zones',
deprecated_for_removal=True,
deprecated_since='Antelope(2023.1)',
deprecated_reason='The agent framework is deprecated.'),
]

View File

@ -0,0 +1,7 @@
---
deprecations:
- |
The backend agent framework and agent based drivers are deprecated for
removal in the "C" release. The following backend agent drivers are now
deprecated: Bind9 (Agent), Denominator, Microsoft DNS (Agent),
Djbdns (Agent), Gdnsd (Agent), Knot2 (Agent).