summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Johnson <johnsomor@gmail.com>2023-02-05 00:28:23 +0000
committerMichael Johnson <johnsomor@gmail.com>2023-02-05 00:29:55 +0000
commit63ca38975575f5b1eefe856ff1662a09b1e06f09 (patch)
treeee38eeae9f814dc913d6d1f9f12968aba7d855f8
parent0e58c3d75729183f266fb9a7814d76eafe0ee3fa (diff)
downloaddesignate-63ca38975575f5b1eefe856ff1662a09b1e06f09.tar.gz
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
-rw-r--r--designate/agent/service.py5
-rw-r--r--designate/backend/agent_backend/base.py3
-rw-r--r--designate/backend/agent_backend/impl_bind9.py9
-rw-r--r--designate/backend/agent_backend/impl_denominator.py8
-rwxr-xr-xdesignate/backend/agent_backend/impl_djbdns.py8
-rw-r--r--designate/backend/agent_backend/impl_fake.py10
-rw-r--r--designate/backend/agent_backend/impl_gdnsd.py7
-rwxr-xr-xdesignate/backend/agent_backend/impl_knot2.py7
-rw-r--r--designate/backend/agent_backend/impl_msdns.py7
-rw-r--r--designate/backend/private_codes.py3
-rw-r--r--designate/cmd/agent.py5
-rw-r--r--designate/conf/agent.py50
-rw-r--r--designate/conf/bind9.py35
-rw-r--r--designate/conf/denominator.py10
-rw-r--r--designate/conf/djbdns.py21
-rw-r--r--designate/conf/gdnsd.py15
-rw-r--r--designate/conf/knot2.py10
-rw-r--r--releasenotes/notes/Deprecate-the-agent-framework-a87c5e286694fb38.yaml7
18 files changed, 191 insertions, 29 deletions
diff --git a/designate/agent/service.py b/designate/agent/service.py
index 9f3e5020..2c15bd62 100644
--- a/designate/agent/service.py
+++ b/designate/agent/service.py
@@ -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,
diff --git a/designate/backend/agent_backend/base.py b/designate/backend/agent_backend/base.py
index afe54160..19d2dd50 100644
--- a/designate/backend/agent_backend/base.py
+++ b/designate/backend/agent_backend/base.py
@@ -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'
diff --git a/designate/backend/agent_backend/impl_bind9.py b/designate/backend/agent_backend/impl_bind9.py
index 3a5598be..f752ca07 100644
--- a/designate/backend/agent_backend/impl_bind9.py
+++ b/designate/backend/agent_backend/impl_bind9.py
@@ -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")
diff --git a/designate/backend/agent_backend/impl_denominator.py b/designate/backend/agent_backend/impl_denominator.py
index 76f110f9..8b06036e 100644
--- a/designate/backend/agent_backend/impl_denominator.py
+++ b/designate/backend/agent_backend/impl_denominator.py
@@ -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])
diff --git a/designate/backend/agent_backend/impl_djbdns.py b/designate/backend/agent_backend/impl_djbdns.py
index f368fd48..c43b68bb 100755
--- a/designate/backend/agent_backend/impl_djbdns.py
+++ b/designate/backend/agent_backend/impl_djbdns.py
@@ -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)
diff --git a/designate/backend/agent_backend/impl_fake.py b/designate/backend/agent_backend/impl_fake.py
index b8ff7899..7eaee686 100644
--- a/designate/backend/agent_backend/impl_fake.py
+++ b/designate/backend/agent_backend/impl_fake.py
@@ -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!")
diff --git a/designate/backend/agent_backend/impl_gdnsd.py b/designate/backend/agent_backend/impl_gdnsd.py
index 134dd15a..8a4215c2 100644
--- a/designate/backend/agent_backend/impl_gdnsd.py
+++ b/designate/backend/agent_backend/impl_gdnsd.py
@@ -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
diff --git a/designate/backend/agent_backend/impl_knot2.py b/designate/backend/agent_backend/impl_knot2.py
index ca9b6b15..9bbf0d44 100755
--- a/designate/backend/agent_backend/impl_knot2.py
+++ b/designate/backend/agent_backend/impl_knot2.py
@@ -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):
diff --git a/designate/backend/agent_backend/impl_msdns.py b/designate/backend/agent_backend/impl_msdns.py
index 182f2d3c..ae397931 100644
--- a/designate/backend/agent_backend/impl_msdns.py
+++ b/designate/backend/agent_backend/impl_msdns.py
@@ -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
diff --git a/designate/backend/private_codes.py b/designate/backend/private_codes.py
index 42769fac..1e1d83f7 100644
--- a/designate/backend/private_codes.py
+++ b/designate/backend/private_codes.py
@@ -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
diff --git a/designate/cmd/agent.py b/designate/cmd/agent.py
index e9d532c0..a2400129 100644
--- a/designate/cmd/agent.py
+++ b/designate/cmd/agent.py
@@ -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)
diff --git a/designate/conf/agent.py b/designate/conf/agent.py
index 16f5b47b..faa846ff 100644
--- a/designate/conf/agent.py
+++ b/designate/conf/agent.py
@@ -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.'),
]
diff --git a/designate/conf/bind9.py b/designate/conf/bind9.py
index beee8696..6d6b0f2a 100644
--- a/designate/conf/bind9.py
+++ b/designate/conf/bind9.py
@@ -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.'),
]
diff --git a/designate/conf/denominator.py b/designate/conf/denominator.py
index 946fb1f8..d7a8c66c 100644
--- a/designate/conf/denominator.py
+++ b/designate/conf/denominator.py
@@ -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.'),
]
diff --git a/designate/conf/djbdns.py b/designate/conf/djbdns.py
index b18ee353..f00c479c 100644
--- a/designate/conf/djbdns.py
+++ b/designate/conf/djbdns.py
@@ -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.'),
]
diff --git a/designate/conf/gdnsd.py b/designate/conf/gdnsd.py
index 0b25e06c..31615abf 100644
--- a/designate/conf/gdnsd.py
+++ b/designate/conf/gdnsd.py
@@ -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.'),
]
diff --git a/designate/conf/knot2.py b/designate/conf/knot2.py
index 67c5eca9..739b3c5d 100644
--- a/designate/conf/knot2.py
+++ b/designate/conf/knot2.py
@@ -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.'),
]
diff --git a/releasenotes/notes/Deprecate-the-agent-framework-a87c5e286694fb38.yaml b/releasenotes/notes/Deprecate-the-agent-framework-a87c5e286694fb38.yaml
new file mode 100644
index 00000000..11cd3734
--- /dev/null
+++ b/releasenotes/notes/Deprecate-the-agent-framework-a87c5e286694fb38.yaml
@@ -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).