Commit cf0ce4ba authored by Stephen Morris's avatar Stephen Morris
Browse files

[2681] Merge branch 'master' into trac2681

Conflicts:
	src/lib/dhcpsrv/alloc_engine.cc
parents 59509918 227f2b1d
572. [bug] marcin
perfdhcp: Fixed bug where the command line switches used to
run the perfdhcp where printed as ASCII codes.
(Trac #2700, git b8d6b949eb7f4705e32fbdfd7694ca2e6a6a5cdc)
571. [build] jinmei
The ./configure script can now handle output from python-config
--ldflags that contains a space after -L switches. This fixes
failure reported on some Solaris environments.
(Trac #2661, git e6f86f2f5eec8e6003c13d36804a767a840d96d6)
570. [bug] tmark, marcin, tomek
b10-dhcp4: Address renewal now works properly for DHCPv4 clients
that do not send client ID.
(Trac #2702, git daf2abe68ce9c111334a15c14e440730f3a085e2)
569. [bug] tomek
b10-dhcp4: Fix bug whereby a DHCP packet without a client ID
could crash the MySQL lease database backend.
(Trac #2697, git b5e2be95d21ed750ad7cf5e15de2058aa8bc45f4)
568. [func] muks
Various message IDs have been renamed to remove the word 'ERROR'
from them when they are not logged at ERROR severity level.
(Trac #2672, git 660a0d164feaf055677f375977f7ed327ead893e)
567. [doc] marcin, stephen, tomek
Update DHCP sections of the BIND 10 guide.
(Trac #2657, git 1d0c2004865d1bf322bf78d13630d992e39179fd)
566. [func]* jinmei
libdns++/Python isc.dns: In Python isc.dns, function style
constants for RRType, RRClass, Rcode and Opcode were deprecated
and replaced with straightforward object constants, e.g., from
RRType.AAAA() to RRType.AAAA. This is a backward incompatible
change (see the Trac ticket for a conversion script if needed).
Also, these constants are now more consistent between C++
and Python, and RRType constants for all currently standardized
types are now supported (even if Rdata for these are not yet
available).
(Trac #1866 and #2409, git e5005185351cf73d4a611407c2cfcd163f80e428)
565. [func]* jelte
The main initializer script (formerly known as either 'bind10',
'boss', or 'bob'), has been renamed to b10-init (and Init in
......
......@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.59])
AC_INIT(bind10, 20121219, bind10-dev@isc.org)
AC_INIT(bind10, 20130205, bind10-dev@isc.org)
AC_CONFIG_SRCDIR(README)
# serial-tests is not available in automake version before 1.13. In
# automake 1.13 and higher, AM_PROG_INSTALL is undefined, so we'll check
......@@ -238,6 +238,21 @@ AM_CONDITIONAL(SET_ENV_LIBRARY_PATH, test $SET_ENV_LIBRARY_PATH = yes)
AC_SUBST(SET_ENV_LIBRARY_PATH)
AC_SUBST(ENV_LIBRARY_PATH)
# Our experiments have shown Solaris 10 has broken support for the
# IPV6_USE_MIN_MTU socket option for getsockopt(); it doesn't return the value
# previously set via setsockopt(). We know it doesn't happen on one instance
# on Solaris 11, but we don't know whether it happens for any Solaris 10
# implementations or for earlier versions of Solaris. In any case, at the
# moment this matters for only one unittest case, so we'll simply disable
# the affected test using the following definition with the specific hardcoding
# of that version of Solaris.
case "$host" in
*-solaris2.10)
AC_DEFINE([HAVE_BROKEN_GET_IPV6_USE_MIN_MTU], [1],
[Define to 1 if getsockopt(IPV6_USE_MIN_MTU) does not work])
;;
esac
m4_define([_AM_PYTHON_INTERPRETER_LIST], [python python3.3 python3.2 python3.1 python3])
AC_ARG_WITH([pythonpath],
AC_HELP_STRING([--with-pythonpath=PATH],
......@@ -298,8 +313,16 @@ AC_SUBST(COMMON_PYTHON_PATH)
if test -x ${PYTHON}-config; then
PYTHON_INCLUDES=`${PYTHON}-config --includes`
for flag in `${PYTHON}-config --ldflags`; do
# add any '-L..." flags to PYTHON_LDFLAGS
# Add any '-L..." flags to PYTHON_LDFLAGS. We first make a copy of
# python-config --ldflags, removing any spaces and tabs
# between "-L" and its argument (some instances of python-config
# insert a space, which would confuse the code below).
# Notes: if -L isn't contained at all we can simply skip this process,
# so we only go through the flag if it's contained; also, protecting
# the output with [] seems necessary for environment to avoid getting
# an empty output accidentally.
python_config_ldflags=[`${PYTHON}-config --ldflags | sed -ne 's/\([ \t]*-L\)[ ]*\([^ \t]*[ \t]*\)/\1\2/pg'`]
for flag in $python_config_ldflags; do
flag=`echo $flag | sed -ne 's/^\(\-L.*\)$/\1/p'`
if test "X${flag}" != X; then
PYTHON_LDFLAGS="$PYTHON_LDFLAGS ${flag}"
......@@ -1319,7 +1342,7 @@ AC_OUTPUT([doc/version.ent
src/bin/stats/stats_httpd.py
src/bin/bind10/init.py
src/bin/bind10/run_bind10.sh
src/bin/bind10/tests/bind10_test.py
src/bin/bind10/tests/init_test.py
src/bin/bindctl/run_bindctl.sh
src/bin/bindctl/bindctl_main.py
src/bin/bindctl/tests/bindctl_test
......
This diff is collapsed.
......@@ -106,7 +106,7 @@ public:
rollbackAddresses_ = old;
}
virtual void commit() {
rollbackAddresses_.release();
rollbackAddresses_.reset();
}
private:
AuthSrv& server_;
......
......@@ -14,7 +14,7 @@
$NAMESPACE isc::auth
% AUTH_AXFR_ERROR error handling AXFR request: %1
% AUTH_AXFR_PROBLEM error handling AXFR request: %1
This is a debug message produced by the authoritative server when it
has encountered an error processing an AXFR request. The message gives
the reason for the error, and the server will return a SERVFAIL code to
......@@ -232,13 +232,13 @@ This is a debug message produced by the authoritative server when it receives
a NOTIFY packet but the XFRIN process is not running. The packet will be
dropped and nothing returned to the sender.
% AUTH_PACKET_PARSE_ERROR unable to parse received DNS packet: %1
% AUTH_PACKET_PARSE_FAILED unable to parse received DNS packet: %1
This is a debug message, generated by the authoritative server when an
attempt to parse a received DNS packet has failed due to something other
than a protocol error. The reason for the failure is given in the message;
the server will return a SERVFAIL error code to the sender.
% AUTH_PACKET_PROTOCOL_ERROR DNS packet protocol error: %1. Returning %2
% AUTH_PACKET_PROTOCOL_FAILURE DNS packet protocol error: %1. Returning %2
This is a debug message, generated by the authoritative server when an
attempt to parse a received DNS packet has failed due to a protocol error.
The reason for the failure is given in the message, as is the error code
......@@ -312,6 +312,9 @@ been created and is initializing. The AUTH_SERVER_STARTED message will be
output when initialization has successfully completed and the server starts
accepting queries.
% AUTH_SERVER_EXITING exiting
The authoritative server is exiting.
% AUTH_SERVER_FAILED server failed: %1
The authoritative server has encountered a fatal error and is terminating. The
reason for the failure is included in the message.
......
......@@ -526,13 +526,13 @@ AuthSrv::processMessage(const IOMessage& io_message, Message& message,
// Parse the message.
message.fromWire(request_buffer);
} catch (const DNSProtocolError& error) {
LOG_DEBUG(auth_logger, DBG_AUTH_DETAIL, AUTH_PACKET_PROTOCOL_ERROR)
LOG_DEBUG(auth_logger, DBG_AUTH_DETAIL, AUTH_PACKET_PROTOCOL_FAILURE)
.arg(error.getRcode().toText()).arg(error.what());
makeErrorMessage(impl_->renderer_, message, buffer, error.getRcode());
impl_->resumeServer(server, message, stats_attrs, true);
return;
} catch (const Exception& ex) {
LOG_DEBUG(auth_logger, DBG_AUTH_DETAIL, AUTH_PACKET_PARSE_ERROR)
LOG_DEBUG(auth_logger, DBG_AUTH_DETAIL, AUTH_PACKET_PARSE_FAILED)
.arg(ex.what());
makeErrorMessage(impl_->renderer_, message, buffer, Rcode::SERVFAIL());
impl_->resumeServer(server, message, stats_attrs, true);
......@@ -725,7 +725,7 @@ AuthSrvImpl::processXfrQuery(const IOMessage& io_message, Message& message,
xfrout_connected_ = false;
}
LOG_DEBUG(auth_logger, DBG_AUTH_DETAIL, AUTH_AXFR_ERROR)
LOG_DEBUG(auth_logger, DBG_AUTH_DETAIL, AUTH_AXFR_PROBLEM)
.arg(err.what());
makeErrorMessage(renderer_, message, buffer, Rcode::SERVFAIL(),
tsig_context);
......
......@@ -44,6 +44,7 @@
#include <server_common/socket_request.h>
#include <boost/bind.hpp>
#include <boost/scoped_ptr.hpp>
#include <sys/types.h>
#include <sys/socket.h>
......@@ -152,10 +153,11 @@ main(int argc, char* argv[]) {
int ret = 0;
// XXX: we should eventually pass io_service here.
Session* cc_session = NULL;
Session* xfrin_session = NULL;
boost::scoped_ptr<AuthSrv> auth_server_; // placeholder
boost::scoped_ptr<Session> cc_session;
boost::scoped_ptr<Session> xfrin_session;
bool xfrin_session_established = false; // XXX (see Trac #287)
ModuleCCSession* config_session = NULL;
boost::scoped_ptr<ModuleCCSession> config_session;
XfroutClient xfrout_client(getXfroutSocketPath());
SocketSessionForwarder ddns_forwarder(getDDNSSocketPath());
try {
......@@ -167,7 +169,8 @@ main(int argc, char* argv[]) {
specfile = string(AUTH_SPECFILE_LOCATION);
}
auth_server = new AuthSrv(xfrout_client, ddns_forwarder);
auth_server_.reset(new AuthSrv(xfrout_client, ddns_forwarder));
auth_server = auth_server_.get();
LOG_INFO(auth_logger, AUTH_SERVER_CREATED);
SimpleCallback* checkin = auth_server->getCheckinProvider();
......@@ -179,7 +182,7 @@ main(int argc, char* argv[]) {
auth_server->setDNSService(dns_service);
LOG_DEBUG(auth_logger, DBG_AUTH_START, AUTH_DNS_SERVICES_CREATED);
cc_session = new Session(io_service.get_io_service());
cc_session.reset(new Session(io_service.get_io_service()));
LOG_DEBUG(auth_logger, DBG_AUTH_START, AUTH_CONFIG_CHANNEL_CREATED);
// Initialize the Socket Requestor
isc::server_common::initSocketRequestor(*cc_session, AUTH_NAME);
......@@ -191,18 +194,18 @@ main(int argc, char* argv[]) {
// updateConfig() for listen_on and in initializing TSIG keys below).
// Until then all operations on the CC session will take place
// synchronously.
config_session = new ModuleCCSession(specfile, *cc_session,
my_config_handler,
my_command_handler, false);
config_session.reset(new ModuleCCSession(specfile, *cc_session,
my_config_handler,
my_command_handler, false));
LOG_DEBUG(auth_logger, DBG_AUTH_START, AUTH_CONFIG_CHANNEL_ESTABLISHED);
xfrin_session = new Session(io_service.get_io_service());
xfrin_session.reset(new Session(io_service.get_io_service()));
LOG_DEBUG(auth_logger, DBG_AUTH_START, AUTH_XFRIN_CHANNEL_CREATED);
xfrin_session->establish(NULL);
xfrin_session_established = true;
LOG_DEBUG(auth_logger, DBG_AUTH_START, AUTH_XFRIN_CHANNEL_ESTABLISHED);
auth_server->setXfrinSession(xfrin_session);
auth_server->setXfrinSession(xfrin_session.get());
// Configure the server. configureAuthServer() is expected to install
// all initial configurations, but as a short term workaround we
......@@ -210,7 +213,7 @@ main(int argc, char* argv[]) {
// updateConfig().
// if server load configure failed, we won't exit, give user second
// chance to correct the configure.
auth_server->setConfigSession(config_session);
auth_server->setConfigSession(config_session.get());
try {
configureAuthServer(*auth_server, config_session->getFullConfig());
auth_server->updateConfig(ElementPtr());
......@@ -228,7 +231,7 @@ main(int argc, char* argv[]) {
config_session->addRemoteConfig("data_sources",
boost::bind(datasrcConfigHandler,
auth_server, &first_time,
config_session,
config_session.get(),
_1, _2, _3),
false);
......@@ -260,10 +263,7 @@ main(int argc, char* argv[]) {
config_session->removeRemoteConfig("data_sources");
}
delete xfrin_session;
delete config_session;
delete cc_session;
delete auth_server;
LOG_INFO(auth_logger, AUTH_SERVER_EXITING);
return (ret);
}
......@@ -130,7 +130,7 @@ TEST_F(AuthConfigTest, invalidListenAddressConfig) {
isc::testutils::portconfig::invalidListenAddressConfig(server);
}
// Try setting addresses trough config
// Try setting addresses through config
TEST_F(AuthConfigTest, listenAddressConfig) {
isc::testutils::portconfig::listenAddressConfig(server);
......
......@@ -20,7 +20,7 @@
<refentry>
<refentryinfo>
<date>April 12, 2012</date>
<date>February 5, 2013</date>
</refentryinfo>
<refmeta>
......@@ -36,7 +36,7 @@
<docinfo>
<copyright>
<year>2010-2012</year>
<year>2010-2013</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
......@@ -493,7 +493,10 @@ xfrin
<refsect1 id='history'><title>HISTORY</title>
<para>The development of <command>b10-init</command>
was started in October 2009.</para>
was started in October 2009.
It was renamed and its configuration identifier changed
in February 2013.
</para>
</refsect1>
<refsect1>
......
#!/bin/sh
prefix=@prefix@
exec_prefix=@exec_prefix@
exec @libexecdir@/@PACKAGE@/b10-init $*
# We use this wrapper script both for production and in-source tests; in
# the latter case B10_FROM_BUILD environment is expected to be defined.
if test -n "${B10_FROM_BUILD}"; then
exec ${B10_FROM_BUILD}/src/bin/bind10/b10-init $*
else
prefix=@prefix@
exec_prefix=@exec_prefix@
exec @libexecdir@/@PACKAGE@/b10-init $*
fi
......@@ -20,7 +20,7 @@
<refentry>
<refentryinfo>
<date>April 12, 2012</date>
<date>February 5, 2013</date>
</refentryinfo>
<refmeta>
......@@ -52,7 +52,7 @@
<title>DESCRIPTION</title>
<para>The <command>bind10</command> script is a simple wrapper that
starts BIND10 by running the <command>b10-init</command> daemon. All
starts BIND 10 by running the <command>b10-init</command> daemon. All
options passed to <command>bind10</command> are directly passed on to
<command>b10-init</command>.</para>
......@@ -62,14 +62,14 @@
<title>SEE ALSO</title>
<para>
<citerefentry>
<refentrytitle>b10-init</refentrytitle><manvolnum>1</manvolnum>
<refentrytitle>b10-init</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citetitle>BIND 10 Guide</citetitle>.
</para>
</refsect1>
<refsect1 id='history'><title>HISTORY</title>
<para>The <command>bind10</command> script was added in Januari 2013
<para>The <command>bind10</command> script was added in February 2013.
</para>
</refsect1>
......
......@@ -72,6 +72,7 @@ import isc.cc
import isc.util.process
import isc.net.parse
import isc.log
import isc.config
from isc.log_messages.init_messages import *
import isc.bind10.component
import isc.bind10.special_component
......
PYCOVERAGE_RUN = @PYCOVERAGE_RUN@
#PYTESTS = args_test.py bind10_test.py
# NOTE: this has a generated test found in the builddir
PYTESTS = bind10_test.py
PYTESTS = init_test.py
noinst_SCRIPTS = $(PYTESTS)
# If necessary (rare cases), explicitly specify paths to dynamic libraries
......
......@@ -31,8 +31,8 @@ import signal
import socket
from isc.net.addr import IPAddr
import time
import isc
import isc.log
import isc.config
import isc.bind10.socket_cache
import errno
import random
......
......@@ -25,7 +25,7 @@ from bindctl.moduleinfo import *
from bindctl.cmdparse import BindCmdParser
from bindctl import command_sets
from xml.dom import minidom
import isc
import isc.config
import isc.cc.data
import http.client
import json
......
......@@ -23,7 +23,7 @@ BINDCTL_PATH=@abs_top_builddir@/src/bin/bindctl
# Note: lib/dns/python/.libs is necessary because __init__.py of isc package
# automatically imports isc.datasrc, which then requires the DNS loadable
# module. #2145 should eliminate the need for it.
PYTHONPATH=@abs_top_srcdir@/src/bin:@abs_top_builddir@/src/lib/python/isc/log_messages:@abs_top_builddir@/src/lib/python:@abs_top_builddir@/src/bin:@abs_top_srcdir@/src/lib/python:@abs_top_builddir@/src/lib/dns/python/.libs
PYTHONPATH=@abs_top_srcdir@/src/bin:@abs_top_builddir@/src/lib/python/isc/log_messages:@abs_top_builddir@/src/lib/python:@abs_top_builddir@/src/bin:@abs_top_srcdir@/src/lib/python
export PYTHONPATH
# If necessary (rare cases), explicitly specify paths to dynamic libraries
......
......@@ -650,4 +650,6 @@ if __name__ == '__main__':
if httpd:
httpd.shutdown()
logger.info(CMDCTL_EXITING)
sys.exit(result)
......@@ -43,6 +43,9 @@ specific error is printed in the message.
This debug message indicates that the given command has been sent to
the given module.
% CMDCTL_EXITING exiting
The b10-cmdctl daemon is exiting.
% CMDCTL_NO_SUCH_USER username not found in user database: %1
A login attempt was made to b10-cmdctl, but the username was not known.
Users can be added with the tool b10-cmdctl-usermgr.
......
......@@ -134,7 +134,7 @@ def get_datasrc_client(cc_session):
function will simply be removed.
'''
HARDCODED_DATASRC_CLASS = RRClass.IN()
HARDCODED_DATASRC_CLASS = RRClass.IN
file, is_default = cc_session.get_remote_config_value("Auth",
"database_file")
# See xfrout.py:get_db_file() for this trick:
......@@ -469,7 +469,7 @@ class DDNSServer:
self.__request_msg.clear(Message.PARSE)
# specify PRESERVE_ORDER as we need to handle each RR separately.
self.__request_msg.from_wire(req_data, Message.PRESERVE_ORDER)
if self.__request_msg.get_opcode() != Opcode.UPDATE():
if self.__request_msg.get_opcode() != Opcode.UPDATE:
raise self.InternalError('Update request has unexpected '
'opcode: ' +
str(self.__request_msg.get_opcode()))
......@@ -536,7 +536,7 @@ class DDNSServer:
else:
tcp_ctx.close()
except socket.error as ex:
logger.warn(DDNS_RESPONSE_SOCKET_ERROR, ClientFormatter(dest), ex)
logger.warn(DDNS_RESPONSE_SOCKET_SEND_FAILED, ClientFormatter(dest), ex)
return False
return True
......@@ -683,7 +683,7 @@ class DDNSServer:
result = ctx[0].send_ready()
if result != DNSTCPContext.SENDING:
if result == DNSTCPContext.CLOSED:
logger.warn(DDNS_RESPONSE_TCP_SOCKET_ERROR,
logger.warn(DDNS_RESPONSE_TCP_SOCKET_SEND_FAILED,
ClientFormatter(ctx[1]))
ctx[0].close()
del self._tcp_ctxs[fileno]
......
......@@ -134,12 +134,12 @@ appropriate ACL configuration or some lower layer filtering. The
number of existing TCP clients are shown in the log, which should be
identical to the current quota.
% DDNS_RESPONSE_SOCKET_ERROR failed to send update response to %1: %2
% DDNS_RESPONSE_SOCKET_SEND_FAILED failed to send update response to %1: %2
Network I/O error happens in sending an update response. The
client's address that caused the error and error details are also
logged.
% DDNS_RESPONSE_TCP_SOCKET_ERROR failed to complete sending update response to %1 over TCP
% DDNS_RESPONSE_TCP_SOCKET_SEND_FAILED failed to complete sending update response to %1 over TCP
b10-ddns had tried to send an update response over TCP, and it hadn't
been completed at that time, and a followup attempt to complete the
send operation failed due to some network I/O error. While a network
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment