diff options
author | Julien Lepiller <julien@lepiller.eu> | 2019-04-27 12:56:25 +0200 |
---|---|---|
committer | Julien Lepiller <julien@lepiller.eu> | 2019-04-27 13:02:31 +0200 |
commit | 6cd7b1be7ea2b675e369c6cbb35b31b3c496648b (patch) | |
tree | bb7a731bdcb40c36a86fcc63ef5a6892d83cc1a8 | |
parent | bdb372a64751e176314436e42a169a915abe4ca7 (diff) | |
download | patches-6cd7b1be7ea2b675e369c6cbb35b31b3c496648b.tar patches-6cd7b1be7ea2b675e369c6cbb35b31b3c496648b.tar.gz |
gnu: knot: Add configuration fields.
* gnu/services/dns.scm (knot-zone-configuration)[zonefile-load]
[journal-content, max-journal-usage, max-journal-depth, max-zone-size]:
New fields.
(knot-zone-config): Serialize them.
* doc/guix.texi (DNS Services): Document them.
-rw-r--r-- | doc/guix.texi | 39 | ||||
-rw-r--r-- | gnu/services/dns.scm | 80 |
2 files changed, 95 insertions, 24 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index e3bd9915bc..d9473a1820 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19829,6 +19829,45 @@ When set, this forbids queries of the ANY type. The delay between a modification in memory and on disk. 0 means immediate synchronization. +@item @code{zonefile-load} (default: @code{#f}) +The way the zone file contents are applied during zone load. Possible values +are: + +@itemize +@item @code{#f} for using the default value from Knot, +@item @code{'none} for not using the zone file at all, +@item @code{'difference} for computing the difference between already available +contents and zone contents and applying it to the current zone contents, +@item @code{'difference-no-serial} for the same as @code{'difference}, but +ignoring the SOA serial in the zone file, while the server takes care of it +automatically. +@item @code{'whole} for loading zone contents from the zone file. +@end itemize + +@item @code{journal-content} (default: @code{#f}) +The way the journal is used to store zone and its changes. Possible values +are @code{'none} to not use it at all, @code{'changes} to store changes and +@code{'all} to store contents. @code{#f} does not set this option, so the +default value from Knot is used. + +@item @code{max-journal-usage} (default: @code{#f}) +The maximum size for the journal on disk. @code{#f} does not set this option, +so the default value from Knot is used. + +@item @code{max-journal-depth} (default: @code{#f}) +The maximum size of the history. @code{#f} does not set this option, so the +default value from Knot is used. + +@item @code{max-zone-size} (default: @code{#f}) +The maximum size of the zone file. This limit is enforced for incoming +transfer and updates. @code{#f} does not set this option, so the default +value from Knot is used. + +@item @code{dnssec-policy} (default: @code{#f}) +A reference to a @code{knot-policy-configuration} record, or the special +name @code{"default"}. If the value is @code{#f}, there is no dnssec signing +on this zone. + @item @code{serial-policy} (default: @code{'increment}) A policy between @code{'increment} and @code{'unixtime}. diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm index 3aa97680a9..0d660dea29 100644 --- a/gnu/services/dns.scm +++ b/gnu/services/dns.scm @@ -163,30 +163,40 @@ (define-record-type* <knot-zone-configuration> knot-zone-configuration make-knot-zone-configuration knot-zone-configuration? - (domain knot-zone-configuration-domain - (default "")) - (file knot-zone-configuration-file - (default "")) ; the file where this zone is saved. - (zone knot-zone-configuration-zone - (default (zone-file))) ; initial content of the zone file - (master knot-zone-configuration-master - (default '())) - (ddns-master knot-zone-configuration-ddns-master - (default #f)) - (notify knot-zone-configuration-notify - (default '())) - (acl knot-zone-configuration-acl - (default '())) - (semantic-checks? knot-zone-configuration-semantic-checks? - (default #f)) - (disable-any? knot-zone-configuration-disable-any? - (default #f)) - (zonefile-sync knot-zone-configuration-zonefile-sync - (default 0)) - (dnssec-policy knot-zone-configuration-dnssec-policy - (default #f)) - (serial-policy knot-zone-configuration-serial-policy - (default 'increment))) + (domain knot-zone-configuration-domain + (default "")) + (file knot-zone-configuration-file + (default "")) ; the file where this zone is saved. + (zone knot-zone-configuration-zone + (default (zone-file))) ; initial content of the zone file + (master knot-zone-configuration-master + (default '())) + (ddns-master knot-zone-configuration-ddns-master + (default #f)) + (notify knot-zone-configuration-notify + (default '())) + (acl knot-zone-configuration-acl + (default '())) + (semantic-checks? knot-zone-configuration-semantic-checks? + (default #f)) + (disable-any? knot-zone-configuration-disable-any? + (default #f)) + (zonefile-sync knot-zone-configuration-zonefile-sync + (default 0)) + (zonefile-load knot-zone-configuration-zonefile-load + (default #f)) + (journal-content knot-zone-configuration-journal-content + (default #f)) + (max-journal-usage knot-zone-configuration-max-journal-usage + (default #f)) + (max-journal-depth knot-zone-configuration-max-journal-depth + (default #f)) + (max-zone-size knot-zone-configuration-max-zone-size + (default #f)) + (dnssec-policy knot-zone-configuration-dnssec-policy + (default #f)) + (serial-policy knot-zone-configuration-serial-policy + (default 'increment))) (define-record-type* <knot-remote-configuration> knot-remote-configuration make-knot-remote-configuration @@ -494,6 +504,12 @@ (acl (list #$@(knot-zone-configuration-acl zone))) (semantic-checks? #$(knot-zone-configuration-semantic-checks? zone)) (disable-any? #$(knot-zone-configuration-disable-any? zone)) + (zone-file-sync #$(knot-zone-configuration-zonefile-sync zone)) + (zone-file-load #$(knot-zone-configuration-zonefile-load zone)) + (journal-content #$(knot-zone-configuration-journal-content zone)) + (max-journal-usage #$(knot-zone-configuration-max-journal-usage zone)) + (max-journal-depth #$(knot-zone-configuration-max-journal-depth zone)) + (max-zone-size #$(knot-zone-configuration-max-zone-size zone)) (dnssec-policy #$(knot-zone-configuration-dnssec-policy zone)) (serial-policy '#$(knot-zone-configuration-serial-policy zone))) (format #t " - domain: ~a\n" domain) @@ -520,6 +536,22 @@ (knot-zone-configuration-acl zone)))) (format #t " semantic-checks: ~a\n" (if semantic-checks? "on" "off")) (format #t " disable-any: ~a\n" (if disable-any? "on" "off")) + (if zonefile-sync + (format #t " zonefile-sync: ~a\n" zonefile-sync)) + (if zonefile-load + (format #t " zonefile-load: ~a\n" + (symbol->string zonefile-load))) + (if journal-content + (format #t " journal-content: ~a\n" + (symbol->string journal-content))) + (if max-journal-usage + (format #t " max-journal-usage: ~a\n" max-journal-usage)) + (if max-journal-depth + (format #t " max-journal-depth: ~a\n" max-journal-depth)) + (if max-zone-size + (format #t " max-zone-size: ~a\n" max-zone-size)) + (if + (format #t " : ~a\n" )) (if dnssec-policy (begin (format #t " dnssec-signing: on\n") |