From 887c666caf46af1d815a13683d3e95f8c324355f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Thu, 30 Jun 2022 15:24:08 +0200 Subject: [PATCH 1/2] Obsolete the "glue-cache" option The "glue-cache" option was marked as deprecated by commit 5ae33351f286feb25a965bf3c9e6b122ab495342 (first released in BIND 9.17.6, back in October 2020), so now obsolete that option, removing all code and documentation related to it. Note: this causes the glue cache feature to be permanently enabled, not disabled. --- bin/named/config.c | 1 - bin/named/named.conf.rst | 2 -- bin/named/server.c | 6 ------ .../system/checkconf/bad-glue-cache-bogus.conf | 16 ---------------- bin/tests/system/checkconf/good-glue-cache.conf | 16 ---------------- doc/arm/reference.rst | 14 -------------- doc/man/named.conf.5in | 2 -- doc/misc/options | 2 -- doc/misc/options.active | 2 -- doc/misc/options.grammar.rst | 1 - lib/dns/include/dns/view.h | 1 - lib/isccfg/namedconf.c | 2 +- lib/ns/query.c | 6 ++---- 13 files changed, 3 insertions(+), 68 deletions(-) delete mode 100644 bin/tests/system/checkconf/bad-glue-cache-bogus.conf delete mode 100644 bin/tests/system/checkconf/good-glue-cache.conf diff --git a/bin/named/config.c b/bin/named/config.c index f7cc14dbaf..83e8bd39fc 100644 --- a/bin/named/config.c +++ b/bin/named/config.c @@ -162,7 +162,6 @@ options {\n\ fetch-quota-params 100 0.1 0.3 0.7;\n\ fetches-per-server 0;\n\ fetches-per-zone 0;\n\ - glue-cache yes;\n\ lame-ttl 0;\n" #ifdef HAVE_LMDB " lmdb-mapsize 32M;\n" diff --git a/bin/named/named.conf.rst b/bin/named/named.conf.rst index c5afdcfddd..15ebf87595 100644 --- a/bin/named/named.conf.rst +++ b/bin/named/named.conf.rst @@ -276,7 +276,6 @@ OPTIONS fstrm-set-output-queue-size integer; fstrm-set-reopen-interval duration; geoip-directory ( quoted_string | none ); - glue-cache boolean;// deprecated heartbeat-interval integer; hostname ( quoted_string | none ); http-listener-clients integer; @@ -693,7 +692,6 @@ VIEW forward ( first | only ); forwarders [ port integer ] [ dscp integer ] { ( ipv4_address | ipv6_address ) [ port integer ] [ dscp integer ]; ... }; - glue-cache boolean;// deprecated ipv4only-contact string; ipv4only-enable boolean; ipv4only-server string; diff --git a/bin/named/server.c b/bin/named/server.c index a8ba34457a..81f724abf4 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -5187,12 +5187,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, INSIST(result == ISC_R_SUCCESS); view->auth_nxdomain = cfg_obj_asboolean(obj); - /* deprecated */ - obj = NULL; - result = named_config_get(maps, "glue-cache", &obj); - INSIST(result == ISC_R_SUCCESS); - view->use_glue_cache = cfg_obj_asboolean(obj); - obj = NULL; result = named_config_get(maps, "minimal-any", &obj); INSIST(result == ISC_R_SUCCESS); diff --git a/bin/tests/system/checkconf/bad-glue-cache-bogus.conf b/bin/tests/system/checkconf/bad-glue-cache-bogus.conf deleted file mode 100644 index c264b26bb0..0000000000 --- a/bin/tests/system/checkconf/bad-glue-cache-bogus.conf +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * SPDX-License-Identifier: MPL-2.0 - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -options { - glue-cache bogusvalue; -}; diff --git a/bin/tests/system/checkconf/good-glue-cache.conf b/bin/tests/system/checkconf/good-glue-cache.conf deleted file mode 100644 index fd5524b6a4..0000000000 --- a/bin/tests/system/checkconf/good-glue-cache.conf +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * SPDX-License-Identifier: MPL-2.0 - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -options { - glue-cache yes; -}; diff --git a/doc/arm/reference.rst b/doc/arm/reference.rst index abd39be914..01d76a3e86 100644 --- a/doc/arm/reference.rst +++ b/doc/arm/reference.rst @@ -2030,20 +2030,6 @@ Boolean Options The default is ``no-auth-recursive``. -.. namedconf:statement:: glue-cache - - When set to ``yes``, a cache is used to improve query performance - when adding address-type (A and AAAA) glue records to the additional - section of DNS response messages that delegate to a child zone. - - The glue cache uses memory proportional to the number of delegations - in the zone. The default setting is ``yes``, which improves - performance at the cost of increased memory usage for the zone. To avoid - this, set it to ``no``. - - .. note:: This option is deprecated and its use is discouraged. The - glue cache will be permanently *enabled* in a future release. - .. namedconf:statement:: minimal-any If set to ``yes``, the server replies with only one of diff --git a/doc/man/named.conf.5in b/doc/man/named.conf.5in index 7cff755038..c05335d992 100644 --- a/doc/man/named.conf.5in +++ b/doc/man/named.conf.5in @@ -326,7 +326,6 @@ options { fstrm\-set\-output\-queue\-size integer; fstrm\-set\-reopen\-interval duration; geoip\-directory ( quoted_string | none ); - glue\-cache boolean;// deprecated heartbeat\-interval integer; hostname ( quoted_string | none ); http\-listener\-clients integer; @@ -779,7 +778,6 @@ view string [ class ] { forward ( first | only ); forwarders [ port integer ] [ dscp integer ] { ( ipv4_address | ipv6_address ) [ port integer ] [ dscp integer ]; ... }; - glue\-cache boolean;// deprecated ipv4only\-contact string; ipv4only\-enable boolean; ipv4only\-server string; diff --git a/doc/misc/options b/doc/misc/options index e749d468e8..bffd4e7a90 100644 --- a/doc/misc/options +++ b/doc/misc/options @@ -192,7 +192,6 @@ options { fstrm-set-output-queue-size ; fstrm-set-reopen-interval ; geoip-directory ( | none ); - glue-cache ; // deprecated heartbeat-interval ; hostname ( | none ); http-listener-clients ; @@ -565,7 +564,6 @@ view [ ] { forward ( first | only ); forwarders [ port ] [ dscp ] { ( | ) [ port ] [ dscp ]; ... }; - glue-cache ; // deprecated ipv4only-contact ; ipv4only-enable ; ipv4only-server ; diff --git a/doc/misc/options.active b/doc/misc/options.active index ae88445869..cedb810e39 100644 --- a/doc/misc/options.active +++ b/doc/misc/options.active @@ -191,7 +191,6 @@ options { fstrm-set-output-queue-size ; fstrm-set-reopen-interval ; geoip-directory ( | none ); - glue-cache ; // deprecated heartbeat-interval ; hostname ( | none ); http-listener-clients ; @@ -561,7 +560,6 @@ view [ ] { forward ( first | only ); forwarders [ port ] [ dscp ] { ( | ) [ port ] [ dscp ]; ... }; - glue-cache ; // deprecated ipv4only-contact ; ipv4only-enable ; ipv4only-server ; diff --git a/doc/misc/options.grammar.rst b/doc/misc/options.grammar.rst index 155a27b92a..d0e8eeea3a 100644 --- a/doc/misc/options.grammar.rst +++ b/doc/misc/options.grammar.rst @@ -128,7 +128,6 @@ fstrm-set-output-queue-size ; fstrm-set-reopen-interval ; geoip-directory ( | none ); - glue-cache ; // deprecated heartbeat-interval ; hostname ( | none ); http-listener-clients ; diff --git a/lib/dns/include/dns/view.h b/lib/dns/include/dns/view.h index c9cd3b61d7..721ac5e60a 100644 --- a/lib/dns/include/dns/view.h +++ b/lib/dns/include/dns/view.h @@ -117,7 +117,6 @@ struct dns_view { bool qminimization; bool qmin_strict; bool auth_nxdomain; - bool use_glue_cache; bool minimal_any; dns_minimaltype_t minimalresponses; bool enablevalidation; diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index 7a7e041a4d..a438fe1f5e 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -2080,7 +2080,7 @@ static cfg_clausedef_t view_clauses[] = { { "filter-aaaa", &cfg_type_bracketed_aml, CFG_CLAUSEFLAG_ANCIENT }, { "filter-aaaa-on-v4", &cfg_type_boolean, CFG_CLAUSEFLAG_ANCIENT }, { "filter-aaaa-on-v6", &cfg_type_boolean, CFG_CLAUSEFLAG_ANCIENT }, - { "glue-cache", &cfg_type_boolean, CFG_CLAUSEFLAG_DEPRECATED }, + { "glue-cache", &cfg_type_boolean, CFG_CLAUSEFLAG_ANCIENT }, { "ipv4only-enable", &cfg_type_boolean, 0 }, { "ipv4only-contact", &cfg_type_astring, 0 }, { "ipv4only-server", &cfg_type_astring, 0 }, diff --git a/lib/ns/query.c b/lib/ns/query.c index 8ce90668f5..c7624290b0 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -2099,10 +2099,8 @@ query_additional(query_ctx_t *qctx, dns_name_t *name, /* * Try to process glue directly. */ - if (qctx->view->use_glue_cache && - (rdataset->type == dns_rdatatype_ns) && - (client->query.gluedb != NULL) && - dns_db_iszone(client->query.gluedb)) + if (rdataset->type == dns_rdatatype_ns && + client->query.gluedb != NULL && dns_db_iszone(client->query.gluedb)) { ns_dbversion_t *dbversion; From f0d2d3c03f450c4ac813f3891b3c7a79586bcc99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Thu, 30 Jun 2022 15:24:08 +0200 Subject: [PATCH 2/2] Add CHANGES entry and release note for GL #2147 --- CHANGES | 4 ++++ doc/notes/notes-current.rst | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 5e45abf17e..8da486b551 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +5912. [cleanup] The "glue-cache" option has been removed. The glue cache + feature still works and is now permanently enabled. + [GL #2147] + 5911. [bug] Update HTTP listener settings on reconfiguration. [GL #3415] diff --git a/doc/notes/notes-current.rst b/doc/notes/notes-current.rst index 43636d10fe..0a73b3da61 100644 --- a/doc/notes/notes-current.rst +++ b/doc/notes/notes-current.rst @@ -30,7 +30,8 @@ New Features Removed Features ~~~~~~~~~~~~~~~~ -- None. +- The ``glue-cache`` *option* has been removed. The glue cache *feature* + still works and is now permanently *enabled*. :gl:`#2147` Feature Changes ~~~~~~~~~~~~~~~