]> granicus.if.org Git - pdns/commitdiff
Metadata update is now in the same transaction as the AXFR. Add sqlite3-presigned...
authorKees Monshouwer <mind04@monshouwer.org>
Mon, 18 Feb 2013 21:02:24 +0000 (22:02 +0100)
committermind04 <mind04@monshouwer.org>
Sun, 28 Apr 2013 08:49:04 +0000 (10:49 +0200)
pdns/slavecommunicator.cc
regression-tests/start-test-stop

index b754076000d6d65364c10ad826fe1d9b8f31c335..fd92f4934f2cb46db37ab5f2d3be25fd55f21451 100644 (file)
@@ -76,7 +76,7 @@ void CommunicatorClass::suck(const string &domain,const string &remote)
     UeberBackend *B=dynamic_cast<UeberBackend *>(P.getBackend());  // copy of the same UeberBackend
     NSEC3PARAMRecordContent ns3pr, hadNs3pr;
     bool narrow, hadNarrow=false;
-    DNSSECKeeper dk; // has its own ueberbackend
+    DNSSECKeeper dk (B); // reuse our backend for DNSSECKeeper
     bool dnssecZone = false;
     bool haveNSEC3=false;
     if(dk.isSecuredZone(domain)) {
index af74ec6113b1e52059ba1f241ac5e7f9932e06f2..a63c37c8559757de28c38b42e40bd9f1e34b2f4a 100755 (executable)
@@ -558,6 +558,39 @@ then
                                break
                        fi
                done
+       elif [ ${context:0:8} = gsqlite3 ]
+       then
+               rm -f pdns.sqlite31
+               sqlite3 pdns.sqlite31 < ../pdns/no-dnssec.schema.sqlite3.sql
+               sqlite3 pdns.sqlite31 < ../pdns/dnssec.schema.sqlite3.sql
+
+               for zone in $(grep zone named.conf  | cut -f2 -d\" | tac)
+               do
+                       sqlite3 pdns.sqlite31 "INSERT INTO domains (name, type, master) VALUES('$zone','SLAVE','127.0.0.1:$port');"
+               done
+
+               port=$((port+100))
+
+               $RUNWRAPPER ../pdns/pdns_server --daemon=no --local-port=$port --socket-dir=./  \
+                       --no-shuffle --launch=gsqlite3 --gsqlite3-dnssec \
+                       --fancy-records --send-root-referral \
+                       --cache-ttl=0 --query-cache-ttl=0 --no-config --slave --retrieval-threads=1 \
+                       --gsqlite3-database=pdns.sqlite31 --gsqlite3-pragma-synchronous=0 |& egrep -v "update records set ordername|insert into records" &
+               echo 'waiting for zones to be slaved'
+               set +e
+               while sleep 10
+               do
+                       todo=$(sqlite3 pdns.sqlite31 'SELECT COUNT(id) FROM domains WHERE last_check IS NULL')
+                       if [ $? -eq 0 ]
+                       then
+                               if [ $todo = 0 ]
+                               then
+                                       break
+                               fi
+                       fi
+               done
+               set -e
+               sqlite3 pdns.sqlite31 ANALYZE;
        elif [ ${context:0:4} = bind ]
        then
                context=${context}-presigned