Changeset 2559

Show
Ignore:
Timestamp:
04/06/12 12:46:52 (14 months ago)
Author:
peter
Message:

Add tinydnsbackend, submitted by Ruben d'Arco

Location:
trunk/pdns
Files:
15 added
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/pdns/configure.ac

    r2550 r2559  
    309309                                [AC_DEFINE([HAVE_LIBOPENDBX], 1, [Have -lopendbx]) LIBOPENDBX="opendbx"] 
    310310                        ) 
     311                ;; 
     312                tinydns) 
     313                        needcdb=yes 
    311314                ;; 
    312315        esac 
     
    508511fi 
    509512 
     513if test "$needcdb" 
     514then 
     515        PKG_CHECK_MODULES(CDB, libcdb, HAVE_CDB=yes, AC_MSG_ERROR([+Could not find libcdb/tinycdb])) 
     516        AC_SUBST(CDB_LIBS) 
     517        AC_SUBST(CDB_CFLAGS) 
     518fi 
     519 
    510520AM_CONDITIONAL(SQLITE3, test "$needsqlite3") 
     521 
    511522 
    512523if test "$needunixodbc" 
     
    611622modules/gsqlitebackend/Makefile modules/gsqlite3backend/Makefile \ 
    612623modules/goraclebackend/Makefile modules/mydnsbackend/Makefile \ 
    613 modules/luabackend/Makefile) 
     624modules/luabackend/Makefile modules/tinydnsbackend/Makefile) 
  • trunk/pdns/modules/Makefile.am

    r2490 r2559  
    11SUBDIRS=@moduledirs@ 
    2 DIST_SUBDIRS=db2backend geobackend gmysqlbackend godbcbackend goraclebackend gpgsqlbackend gsqlite3backend gsqlitebackend ldapbackend luabackend mongodbbackend mydnsbackend odbcbackend opendbxbackend oraclebackend pipebackend xdbbackend 
     2DIST_SUBDIRS=db2backend geobackend gmysqlbackend godbcbackend goraclebackend gpgsqlbackend gsqlite3backend gsqlitebackend ldapbackend luabackend mongodbbackend mydnsbackend odbcbackend opendbxbackend oraclebackend pipebackend xdbbackend tinydnsbackend 
  • trunk/pdns/pdns/docs/pdns.xml

    r2557 r2559  
    1705017050      </para> 
    1705117051    </sect1> 
     17052    <sect1 id="tinydnsbackend"><title>TinyDNS Backend</title> 
     17053      <para> 
     17054        <warning> 
     17055                <para> 
     17056            The TinyDNS Backend is available since PowerDNS Authoritative Server 3.1. This backend is marked as experimental! 
     17057                </para> 
     17058              </warning> 
     17059      </para> 
     17060        <table> 
     17061              <title>TinyDNS backend capabilities</title> 
     17062          <tgroup cols="2"> 
     17063          <tbody> 
     17064            <row><entry>Native</entry><entry>Yes</entry></row> 
     17065            <row><entry>Master</entry><entry>Yes</entry></row> 
     17066              <row><entry>Slave</entry><entry>No</entry></row> 
     17067              <row><entry>Superslave</entry><entry>No</entry></row> 
     17068              <row><entry>Autoserial</entry><entry>No</entry></row> 
     17069              <row><entry>DNSSEC</entry><entry>No</entry></row> 
     17070            <row><entry>Multiple instances</entry><entry>Yes</entry></row> 
     17071          </tbody> 
     17072          </tgroup> 
     17073        </table> 
     17074      <para> 
     17075The TinyDNS backend allows you to use <ulink url="http://cr.yp.to/djbdns.html">djbdns's</ulink> data.cdb file format as 
     17076the storage of your DNS records. The data.cdb file is created using  
     17077<ulink url="http://cr.yp.to/djbdns/tinydns-data.html">tinydns-data</ulink>. The backend is designed to be able to use  
     17078the data.cdb files without any changes. 
     17079      </para> 
     17080     <sect2 id="tinydnsbackend-parameters"><title>Configuration Parameters</title> 
     17081        <para> 
     17082          These are the configuration file parameters that are available for the TinyDNS backend. It is recommended to set the tinydns-dbfile. 
     17083          <variablelist> 
     17084            <varlistentry> 
     17085              <term>tinydns-dbfile</term> 
     17086              <listitem> 
     17087                <para>Specifies the name of the data file to use. The default is 'data.cdb'.</para> 
     17088              </listitem> 
     17089            </varlistentry> 
     17090            <varlistentry> 
     17091              <term>tinydns-tai-adjust</term> 
     17092              <listitem> 
     17093                <para> 
     17094This adjusts the <ulink url="http://www.tai64.com/">TAI</ulink> value if timestamps are used. 
     17095These seconds will be added to the start point (1970) and will allow you to adjust for leap seconds. The current default is 10,  
     17096<ulink url="http://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat">but as of june 30th 2012</ulink> should be 11. 
     17097                </para> 
     17098              </listitem> 
     17099            </varlistentry> 
     17100            <varlistentry> 
     17101              <term>tinydns-notify-on-startup</term> 
     17102              <listitem> 
     17103                <para>Tell the TinyDNSBackend to notify all the slave nameservers on startup. This might cause broadcast storms. Default is no.</para> 
     17104              </listitem> 
     17105            </varlistentry> 
     17106             <varlistentry> 
     17107              <term>tinydns-locations</term> 
     17108              <listitem> 
     17109                <para>Enable or Disable location support in the backend. Changing the value to 'no' will make the backend ignore the locations. This then returns all records. When the setting is changed to 'no' an AXFR will also return all the records. With the setting on 'yes' an AXFR will only return records without a location.</para> 
     17110              </listitem> 
     17111            </varlistentry> 
     17112          </variablelist> 
     17113        </para> 
     17114      </sect2> 
     17115      <sect2 id="tinydnsbackend-features"><title>Location and Timestamp support</title> 
     17116        <para> 
     17117Both timestamp and location are supported in the backend. Locations support can be changed using the <command>tinydns-locations</command> setting. 
     17118Timestamp and location only work as expected when <command>cache-ttl</command> and <command>query-cache-ttl</command> are set to 0  
     17119(which disables these caches). Timestamp can operate with <command>cache-ttl</command> if cache is needed, but the TTL returned for the  
     17120timestamped racked will not be totally correct. The record will expire once the cache is expired and the backend is queried again.  
     17121Please note that <command>cache-ttl</command> is a performance related setting. See <xref linkend="performance-settings" />. 
     17122Location support only exists for IPv4! 
     17123        </para> 
     17124      </sect2> 
     17125 
     17126      <sect2 id="tinydnsbackend-master-mode"><title>Master mode</title> 
     17127        <para> 
     17128The TinyDNSBackend supports master mode. This allows it to notify slave nameservers of updates to a zone. 
     17129You simply need to rewrite the data.cdb file with an updated/increased serial and PowerDNS will notify the slave nameservers  
     17130of that domain. The <command>tinydns-notify-on-startup</command> configuration setting tells the backend if it should  
     17131notify all the slave nameservers just after startup. 
     17132        </para> 
     17133        <para> 
     17134The CDB datafile does not allow PowerDNS to easily query for newly added domains or updated serial numbers. 
     17135The CDB datafile requires us to do a full scan of all the records. When running with verbose logging, this could  
     17136lead to a lot of output. The scanning of the CDB file may also take a while on systems with large files. The scan happens  
     17137at an interval set by the <command>slave-cycle-interval</command>. It might be useful to raise 
     17138this value to limit the amount of scans on the CDB file. 
     17139        </para> 
     17140        <para> 
     17141The TinyDNSBackend also keeps a list of all the zones. This is needed to detect an updated serial and to give 
     17142every zone a unique id. The list is updated when a zone is added, but not when a zone is removed. This leads to some 
     17143memory loss. 
     17144        </para> 
     17145      </sect2> 
     17146      <sect2 id="tinydnsbackend-implementation-notes"><title>Useful implementation notes</title> 
     17147        <para> 
     17148This backend might solve some issues you have with the current tinydns noted on  
     17149<ulink url="http://homepage.ntlworld.com/jonathan.deboynepollard/author.html">Jonathan de Boyne Pollard's</ulink>  
     17150<ulink url="http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/djbdns-problems.html">djbdns known problems page</ulink>. 
     17151        </para> 
     17152        <para> 
     17153The data.cdb file format support all types of records. They are sometimes difficult to create because you need to specify the 
     17154actual content of the rdata. <ulink url="http://tinydns.org/">Tinydns.org</ulink> provides a number of links to tools/cgi-scripts 
     17155that allow you to create records. <ulink url="http://anders.com/">Anders Brownworth</ulink> also privides a number of useful  
     17156record building scripts on his <ulink url="http://anders.com/projects/sysadmin/djbdnsRecordBuilder/">djbdnsRecordBuilder</ulink>. 
     17157        </para> 
     17158        <para>Compiling the TinyDNS backend requires you to have <ulink url="http://www.corpit.ru/mjt/tinycdb.html">tinycdb</ulink> version 0.77.</para> 
     17159      </sect2> 
     17160    </sect1> 
    1705217161  </appendix> 
    1705317162<appendix id="pdns-internals"><title>PDNS internals</title> 
  • trunk/pdns/regression-tests/start-test-stop

    r2494 r2559  
    2626gsqlite3-nodnssec gsqlite3 gsqlite3-nsec3 
    2727gpgsql-nodnssec gpgsql gpgsql-nsec3 
     28tinydns 
    2829 
    2930add 'wait' (literally) after the context to not kill  
     
    254255                                extracontexts="dnssec" 
    255256                        fi 
    256                         ;;                                               
     257                        ;; 
     258                tinydns) 
     259                        ../pdns/pdns_server --daemon=no --local-port=$port --socket-dir=./ \ 
     260                                --no-shuffle --launch=tinydns \ 
     261                                --query-logging --loglevel=9 --cache-ttl=0 --no-config \ 
     262                                --send-root-referral \ 
     263                                --tinydns-dbfile=../modules/tinydnsbackend/data.cdb &  
     264                        skipreasons=nodnssec 
     265                        ;; 
    257266                *) 
    258267                        echo unknown context $context