From 241b49e6119eb37eebe2de98f0e8bde436074cb3 Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Wed, 26 Apr 2017 23:43:35 +0530 Subject: [PATCH] Set a LMDB mapsize and also provide a config option to control it (#44954) --- CHANGES | 7 ++ bin/named/config.c | 1 + bin/named/named.conf.docbook | 6 +- bin/named/server.c | 74 +++++++++++++++++-- .../checkconf/bad-lmdb-mapsize-bogus.conf | 11 +++ .../checkconf/bad-lmdb-mapsize-toolarge.conf | 11 +++ .../checkconf/bad-lmdb-mapsize-toosmall.conf | 11 +++ .../checkconf/bad-lmdb-mapsize-unlimited.conf | 11 +++ .../checkconf/good-lmdb-mapsize-largest.conf | 11 +++ .../checkconf/good-lmdb-mapsize-smallest.conf | 11 +++ doc/arm/Bv9ARM-book.xml | 34 +++++++++ doc/misc/options | 2 + lib/bind9/check.c | 25 +++++++ lib/dns/include/dns/view.h | 2 +- lib/dns/view.c | 12 ++- lib/isccfg/include/isccfg/grammar.h | 3 + lib/isccfg/namedconf.c | 6 ++ lib/isccfg/parser.c | 7 ++ 18 files changed, 233 insertions(+), 12 deletions(-) create mode 100644 bin/tests/system/checkconf/bad-lmdb-mapsize-bogus.conf create mode 100644 bin/tests/system/checkconf/bad-lmdb-mapsize-toolarge.conf create mode 100644 bin/tests/system/checkconf/bad-lmdb-mapsize-toosmall.conf create mode 100644 bin/tests/system/checkconf/bad-lmdb-mapsize-unlimited.conf create mode 100644 bin/tests/system/checkconf/good-lmdb-mapsize-largest.conf create mode 100644 bin/tests/system/checkconf/good-lmdb-mapsize-smallest.conf diff --git a/CHANGES b/CHANGES index 7e2a5f8c87..acaf41e29c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,10 @@ +4611. [bug] The default LMDB mapsize was too low and caused + errors after few thousand zones were added using + rndc addzone. A new config option "lmdb-mapsize" + has been introduced to configure the LMDB + mapsize depending on operational needs. + [RT #44954] + 4610. [func] The "new-zones-directory" option specifies the location of NZF or NZD files for storing configuration of zones added by "rndc addzone". diff --git a/bin/named/config.c b/bin/named/config.c index 585528fc84..cd5488bc74 100644 --- a/bin/named/config.c +++ b/bin/named/config.c @@ -176,6 +176,7 @@ options {\n\ zero-no-soa-ttl-cache no;\n\ nsec3-test-zone no;\n\ allow-new-zones no;\n\ + lmdb-mapsize 32M;\n\ fetches-per-server 0;\n\ require-server-cookie no;\n\ v6-bias 50;\n\ diff --git a/bin/named/named.conf.docbook b/bin/named/named.conf.docbook index 80481c811b..3f99c779b6 100644 --- a/bin/named/named.conf.docbook +++ b/bin/named/named.conf.docbook @@ -1,5 +1,5 @@