From: Jelte Jansen Date: Fri, 9 Mar 2012 10:03:23 +0000 (+0100) Subject: [1280] address review comments X-Git-Tag: trac2351_base~226^2~116^2~126^2~1^2~3^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee3042d8a998de0a2a272003f53957a1af500901;p=thirdparty%2Fkea.git [1280] address review comments fix systest rename 'axfr' message and use both for AXFR and AXFR-style IXFR --- diff --git a/src/bin/xfrin/xfrin.py.in b/src/bin/xfrin/xfrin.py.in index 15fa4d3f1c..863c5b9234 100755 --- a/src/bin/xfrin/xfrin.py.in +++ b/src/bin/xfrin/xfrin.py.in @@ -889,8 +889,9 @@ class XfrinConnection(asyncore.dispatcher): self._send_query(self._request_type) self.__state = XfrinInitialSOA() self._handle_xfrin_responses() - # Depending on the transfer type, we log different status reports - if request_type == RRType.IXFR(): + # Depending what data was found, we log different status reports + # (In case of an AXFR-style IXFR, print the 'AXFR' message) + if self._transfer_stats.axfr_rr_count == 0: logger.info(XFRIN_IXFR_TRANSFER_SUCCESS, self.zone_str(), self._transfer_stats.message_count, @@ -902,7 +903,8 @@ class XfrinConnection(asyncore.dispatcher): "%.f" % self._transfer_stats.get_bytes_per_second() ) else: - logger.info(XFRIN_AXFR_TRANSFER_SUCCESS, + logger.info(XFRIN_TRANSFER_SUCCESS, + req_str, self.zone_str(), self._transfer_stats.message_count, self._transfer_stats.axfr_rr_count, diff --git a/src/bin/xfrin/xfrin_messages.mes b/src/bin/xfrin/xfrin_messages.mes index 1f3ce2e4e6..eae1c698c4 100644 --- a/src/bin/xfrin/xfrin_messages.mes +++ b/src/bin/xfrin/xfrin_messages.mes @@ -31,22 +31,6 @@ turns out to happen with a real world primary server implementation and that server actually feeds broken data (e.g. mixed versions of zone), we can consider a stricter action. -% XFRIN_AXFR_TRANSFER_SUCCESS full transfer of zone %1 succeeded (messages: %2, records: %3, bytes: %4, run time: %5 seconds, %6 bytes/second) -The AXFR transfer of the given zone was successful. -The provided information contains the following values: - -messages: Number of overhead DNS messages in the transfer - -records: Number of Resource Records in the full transfer, excluding the -final SOA record that marks the end of the AXFR. - -bytes: Full size of the transfer data on the wire. - -run time: Time (in seconds) the complete axfr took - -bytes/second: Transfer speed - - % XFRIN_BAD_MASTER_ADDR_FORMAT bad format for master address: %1 The given master address is not a valid IP address. @@ -89,7 +73,7 @@ is not equal to the requested SOA serial. There was an error importing the python DNS module pydnspp. The most likely cause is a PYTHONPATH problem. -% XFRIN_IXFR_TRANSFER_SUCCESS incremental transfer of zone %1 succeeded (messages: %2, changesets: %3, deletions: %4, additions: %5, bytes: %6, run time: %7 seconds, %8 bytes/second) +% XFRIN_IXFR_TRANSFER_SUCCESS incremental IXFR transfer of zone %1 succeeded (messages: %2, changesets: %3, deletions: %4, additions: %5, bytes: %6, run time: %7 seconds, %8 bytes/second) The IXFR transfer for the given zone was successful. The provided information contains the following values: @@ -152,6 +136,21 @@ An informational message, this is output when the resolver starts up. There was a keyboard interrupt signal to stop the xfrin daemon. The daemon will now shut down. +% XFRIN_TRANSFER_SUCCESS full %1 transfer of zone %2 succeeded (messages: %3, records: %4, bytes: %5, run time: %6 seconds, %7 bytes/second) +The AXFR transfer of the given zone was successful. +The provided information contains the following values: + +messages: Number of overhead DNS messages in the transfer + +records: Number of Resource Records in the full transfer, excluding the +final SOA record that marks the end of the AXFR. + +bytes: Full size of the transfer data on the wire. + +run time: Time (in seconds) the complete axfr took + +bytes/second: Transfer speed + % XFRIN_UNKNOWN_ERROR unknown error: %1 An uncaught exception was raised while running the xfrin daemon. The exception message is printed in the log message. diff --git a/tests/lettuce/features/xfrin_bind10.feature b/tests/lettuce/features/xfrin_bind10.feature index cdc749b9a8..8bc6e5e9fa 100644 --- a/tests/lettuce/features/xfrin_bind10.feature +++ b/tests/lettuce/features/xfrin_bind10.feature @@ -7,5 +7,5 @@ Feature: Xfrin A query for www.example.org should have rcode REFUSED Wait for bind10 stderr message CMDCTL_STARTED When I send bind10 the command Xfrin retransfer example.org IN 127.0.0.1 47807 - Then wait for new bind10 stderr message XFRIN_AXFR_TRANSFER_SUCCESS not XFRIN_XFR_PROCESS_FAILURE + Then wait for new bind10 stderr message XFRIN_TRANSFER_SUCCESS not XFRIN_XFR_PROCESS_FAILURE A query for www.example.org should have rcode NOERROR diff --git a/tests/system/ixfr/in-2/tests.sh b/tests/system/ixfr/in-2/tests.sh index 7b1e2a86a0..30507139ec 100644 --- a/tests/system/ixfr/in-2/tests.sh +++ b/tests/system/ixfr/in-2/tests.sh @@ -54,7 +54,7 @@ then exit 1 fi -grep XFRIN_XFR_TRANSFER_SUCCESS nsx2/bind10.run | grep IXFR > /dev/null +grep XFRIN_IXFR_TRANSFER_SUCCESS nsx2/bind10.run | grep IXFR > /dev/null if [ $? -ne 0 ]; then echo "R:$CLIENT_NAME FAIL no 'IXFR successful' message in the BIND 10 log"