From 63f066b9f104af7b83b48d32ab713363d7e1e54b Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Thu, 7 Jan 2016 16:53:52 +0100 Subject: [PATCH] Remove useless/old BIND backend options --- .../appendix/backend-writers-guide.md | 19 +++--- docs/markdown/authoritative/backend-bind.md | 59 ++++++++++++------- docs/markdown/authoritative/howtos.md | 3 +- 3 files changed, 47 insertions(+), 34 deletions(-) diff --git a/docs/markdown/appendix/backend-writers-guide.md b/docs/markdown/appendix/backend-writers-guide.md index 381026dc0..21d8b5c23 100644 --- a/docs/markdown/appendix/backend-writers-guide.md +++ b/docs/markdown/appendix/backend-writers-guide.md @@ -266,20 +266,15 @@ Returns the exact value of a parameter. ### `int getArgAsNum(const string &key)` Returns the numerical value of a parameter. Uses `atoi()` internally -Sample usage from the BindBackend, using the [`bind-example-zones`](../authoritative/backend-bind.md#bind-example-zones) and [`bind-config`](../authoritative/backend-bind.md#bind-config) parameters. +Sample usage from the BindBackend: getting the 'check-interval' setting: ``` - if(mustDo("example-zones")) { - insert(0,"www.example.com","A","192.0.2.4"); - /* ... */ - } - - if(!getArg("config").empty()) { - BindParser BP; - - BP.parse(getArg("config")); - } - +if(!safeGetBBDomainInfo(i->name, &bbd)) { + bbd.d_id=domain_id++; + bbd.setCheckInterval(getArgAsNum("check-interval")); + bbd.d_lastnotified=0; + bbd.d_loaded=false; +} ``` ## Read/write slave-capable backends diff --git a/docs/markdown/authoritative/backend-bind.md b/docs/markdown/authoritative/backend-bind.md index 3316e7671..31f90e8b3 100644 --- a/docs/markdown/authoritative/backend-bind.md +++ b/docs/markdown/authoritative/backend-bind.md @@ -18,17 +18,11 @@ The BindBackend started life as a demonstration of the versatility of PDNS but q The BindBackend parses a Bind-style `named.conf` and extracts information about zones from it. It makes no attempt to honour other configuration flags, which you should configure (when available) using the PDNS native configuration. ## Configuration Parameters -### `--help=bind` -Outputs all known parameters related to the bindbackend - -### `bind-example-zones` -Loads the 'example.com' zone which can be queried to determine if PowerDNS is functioning without configuring database backends. This feature is no longer supported from 2.9.21 onwards. - ### `bind-config` Location of the Bind configuration file to parse. ### `bind-check-interval` -How often to check for zone changes. See 'Operation' section. +How often to check for zone changes. See ['Operation'](#operation) section. ### `bind-dnssec-db` Filename to store and access our DNSSEC metadatabase, empty for none. @@ -45,18 +39,31 @@ Setting this option to `yes` makes PowerDNS ignore out of zone records when loading zone files. ## Operation -On launch, the BindBackend first parses the `named.conf` to determine which zones need to be loaded. These will then be parsed and made available for serving, as they are parsed. So a `named.conf` with 100.000 zones may take 20 seconds to load, but after 10 seconds, 50.000 zones will already be available. While a domain is being loaded, it is not yet available, to prevent incomplete answers. - -Reloading is currently done only when a request for a zone comes in, and then only after [`bind-check-interval`](#bind-check-interval) seconds have passed after the last check. If a change occurred, access to the zone is disabled, the file is reloaded, access is restored, and the question is answered. For regular zones, reloading is fast enough to answer the question which lead to the reload within the DNS timeout. - -If [`bind-check-interval`](#bind-check-interval) is specified as zero, no checks will be performed until the `pdns_control reload` is given. +On launch, the BindBackend first parses the `named.conf` to determine which zones +need to be loaded. These will then be parsed and made available for serving, as +they are parsed. So a `named.conf` with 100.000 zones may take 20 seconds to load, +but after 10 seconds, 50.000 zones will already be available. While a domain is +being loaded, it is not yet available, to prevent incomplete answers. + +Reloading is currently done only when a request for a zone comes in, and then +only after [`bind-check-interval`](#bind-check-interval) seconds have passed after +the last check. If a change occurred, access to the zone is disabled, the file +is reloaded, access is restored, and the question is answered. For regular zones, +reloading is fast enough to answer the question which lead to the reload within +the DNS timeout. + +If [`bind-check-interval`](#bind-check-interval) is specified as zero, no checks +will be performed until the `pdns_control reload` is given. ## pdns\_control commands ### `bind-add-zone ` -Add zone `domain` from `filename` to PDNS's bind backend. Zone will be loaded at first request. +Add zone `domain` from `filename` to PDNS's bind backend. Zone will be loaded at +first request. **Note**: this does not add the zone to the [`bind-config`](#bind-config) +file. ### `bind-domain-status [domain]` -Output status of domain or domains. Can be one of `seen in named.conf, not parsed`, `parsed successfully at