Commit 4102716a authored by Dima Volodin's avatar Dima Volodin

Merge branch 'master' into trac1144

parents 8975d286 3027ed20
277. [func] jerry
Implement the SRV rrtype according to RFC2782.
(Trac #1128, git 5fd94aa027828c50e63ae1073d9d6708e0a9c223)
276. [func] stephen
Although the top-level loggers are named after the program (e.g.
b10-auth, b10-resolver), allow the logger configuration to omit the
"b10-" prefix and use just the module name.
(Trac #1003, git a01cd4ac5a68a1749593600c0f338620511cae2d)
275. [func] jinmei
Added support for TSIG key matching in ACLs. The xfrout ACL can
now refer to TSIG key names using the "key" attribute. For
......
......@@ -839,6 +839,8 @@ AC_CONFIG_FILES([Makefile
src/lib/python/isc/notify/Makefile
src/lib/python/isc/notify/tests/Makefile
src/lib/python/isc/testutils/Makefile
src/lib/python/isc/bind10/Makefile
src/lib/python/isc/bind10/tests/Makefile
src/lib/config/Makefile
src/lib/config/tests/Makefile
src/lib/config/tests/testdata/Makefile
......@@ -907,7 +909,6 @@ AC_OUTPUT([doc/version.ent
src/bin/bind10/bind10_src.py
src/bin/bind10/run_bind10.sh
src/bin/bind10/tests/bind10_test.py
src/bin/bind10/tests/sockcreator_test.py
src/bin/bindctl/run_bindctl.sh
src/bin/bindctl/bindctl_main.py
src/bin/bindctl/tests/bindctl_test
......
......@@ -56,6 +56,7 @@ EXTRA_DIST += auth_messages.mes
b10_auth_LDADD = $(top_builddir)/src/lib/datasrc/libdatasrc.la
b10_auth_LDADD += $(top_builddir)/src/lib/dns/libdns++.la
b10_auth_LDADD += $(top_builddir)/src/lib/util/libutil.la
b10_auth_LDADD += $(top_builddir)/src/lib/config/libcfgclient.la
b10_auth_LDADD += $(top_builddir)/src/lib/cc/libcc.la
b10_auth_LDADD += $(top_builddir)/src/lib/exceptions/libexceptions.la
......
......@@ -63,7 +63,7 @@ datebase data source, listing the file that is being accessed.
% AUTH_DNS_SERVICES_CREATED DNS services created
This is a debug message indicating that the component that will handling
incoming queries for the authoritiative server (DNSServices) has been
incoming queries for the authoritative server (DNSServices) has been
successfully created. It is issued during server startup is an indication
that the initialization is proceeding normally.
......@@ -74,7 +74,7 @@ reason for the failure is given in the message.) The server will drop the
packet.
% AUTH_LOAD_TSIG loading TSIG keys
This is a debug message indicating that the authoritiative server
This is a debug message indicating that the authoritative server
has requested the keyring holding TSIG keys from the configuration
database. It is issued during server startup is an indication that the
initialization is proceeding normally.
......@@ -141,8 +141,8 @@ encountered an internal error whilst processing a received packet:
the cause of the error is included in the message.
The server will return a SERVFAIL error code to the sender of the packet.
However, this message indicates a potential error in the server.
Please open a bug ticket for this issue.
This message indicates a potential error in the server. Please open a
bug ticket for this issue.
% AUTH_RECEIVED_COMMAND command '%1' received
This is a debug message issued when the authoritative server has received
......@@ -209,7 +209,7 @@ channel. It is issued during server startup is an indication that the
initialization is proceeding normally.
% AUTH_STATS_COMMS communication error in sending statistics data: %1
An error was encountered when the authoritiative server tried to send data
An error was encountered when the authoritative server tried to send data
to the statistics daemon. The message includes additional information
describing the reason for the failure.
......
......@@ -17,6 +17,7 @@ query_bench_SOURCES += ../auth_log.h ../auth_log.cc
nodist_query_bench_SOURCES = ../auth_messages.h ../auth_messages.cc
query_bench_LDADD = $(top_builddir)/src/lib/dns/libdns++.la
query_bench_LDADD += $(top_builddir)/src/lib/util/libutil.la
query_bench_LDADD += $(top_builddir)/src/lib/exceptions/libexceptions.la
query_bench_LDADD += $(top_builddir)/src/lib/bench/libbench.la
query_bench_LDADD += $(top_builddir)/src/lib/datasrc/libdatasrc.la
......
......@@ -47,6 +47,7 @@ run_unittests_LDADD += $(SQLITE_LIBS)
run_unittests_LDADD += $(top_builddir)/src/lib/testutils/libtestutils.la
run_unittests_LDADD += $(top_builddir)/src/lib/datasrc/libdatasrc.la
run_unittests_LDADD += $(top_builddir)/src/lib/dns/libdns++.la
run_unittests_LDADD += $(top_builddir)/src/lib/util/libutil.la
run_unittests_LDADD += $(top_builddir)/src/lib/asiodns/libasiodns.la
run_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libasiolink.la
run_unittests_LDADD += $(top_builddir)/src/lib/config/libcfgclient.la
......
SUBDIRS = . tests
sbin_SCRIPTS = bind10
CLEANFILES = bind10 bind10_src.pyc bind10_messages.py bind10_messages.pyc \
sockcreator.pyc
python_PYTHON = __init__.py sockcreator.py
pythondir = $(pyexecdir)/bind10
CLEANFILES = bind10 bind10_src.pyc bind10_messages.py bind10_messages.pyc
pkglibexecdir = $(libexecdir)/@PACKAGE@
pyexec_DATA = bind10_messages.py
......
......@@ -122,7 +122,7 @@ The boss requested a socket from the creator, but the answer is unknown. This
looks like a programmer error.
% BIND10_SOCKCREATOR_CRASHED the socket creator crashed
The socket creator terminated unexpectadly. It is not possible to restart it
The socket creator terminated unexpectedly. It is not possible to restart it
(because the boss already gave up root privileges), so the system is going
to terminate.
......
......@@ -67,7 +67,7 @@ import isc.util.process
import isc.net.parse
import isc.log
from bind10_messages import *
import bind10.sockcreator
import isc.bind10.sockcreator
isc.log.init("b10-boss")
logger = isc.log.Logger("boss")
......@@ -337,8 +337,8 @@ class BoB:
def start_creator(self):
self.curproc = 'b10-sockcreator'
self.sockcreator = bind10.sockcreator.Creator("@@LIBEXECDIR@@:" +
os.environ['PATH'])
self.sockcreator = isc.bind10.sockcreator.Creator("@@LIBEXECDIR@@:" +
os.environ['PATH'])
def stop_creator(self, kill=False):
if self.sockcreator is None:
......
......@@ -20,7 +20,7 @@ export PYTHON_EXEC
BIND10_PATH=@abs_top_builddir@/src/bin/bind10
PATH=@abs_top_builddir@/src/bin/msgq:@abs_top_builddir@/src/bin/auth:@abs_top_builddir@/src/bin/resolver:@abs_top_builddir@/src/bin/cfgmgr:@abs_top_builddir@/src/bin/cmdctl:@abs_top_builddir@/src/bin/stats:@abs_top_builddir@/src/bin/xfrin:@abs_top_builddir@/src/bin/xfrout:@abs_top_builddir@/src/bin/zonemgr:@abs_top_builddir@/src/bin/dhcp6:$PATH
PATH=@abs_top_builddir@/src/bin/msgq:@abs_top_builddir@/src/bin/auth:@abs_top_builddir@/src/bin/resolver:@abs_top_builddir@/src/bin/cfgmgr:@abs_top_builddir@/src/bin/cmdctl:@abs_top_builddir@/src/bin/stats:@abs_top_builddir@/src/bin/xfrin:@abs_top_builddir@/src/bin/xfrout:@abs_top_builddir@/src/bin/zonemgr:@abs_top_builddir@/src/bin/dhcp6:@abs_top_builddir@/src/bin/sockcreator:$PATH
export PATH
PYTHONPATH=@abs_top_builddir@/src/lib/python:@abs_top_builddir@/src/lib/dns/python/.libs:@abs_top_builddir@/src/lib/xfr/.libs:@abs_top_builddir@/src/lib/log/.libs:@abs_top_builddir@/src/lib/util/io/.libs:@abs_top_builddir@/src/lib/python/isc/config:@abs_top_builddir@/src/lib/python/isc/acl/.libs:
......
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 sockcreator_test.py
PYTESTS = bind10_test.py
# If necessary (rare cases), explicitly specify paths to dynamic libraries
# required by loadable python modules.
......
......@@ -69,7 +69,7 @@ There was a keyboard interrupt signal to stop the cmdctl daemon. The
daemon will now shut down.
% CMDCTL_UNCAUGHT_EXCEPTION uncaught exception: %1
The b10-cdmctl daemon encountered an uncaught exception and
The b10-cmdctl daemon encountered an uncaught exception and
will now shut down. This is indicative of a programming error and
should not happen under normal circumstances. The exception message
is printed.
......
......@@ -35,6 +35,7 @@ b10_dhcp6_SOURCES = main.cc
b10_dhcp6_SOURCES += dhcp6.h
b10_dhcp6_LDADD = $(top_builddir)/src/lib/datasrc/libdatasrc.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/dns/libdns++.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/util/libutil.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/config/libcfgclient.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/cc/libcc.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/exceptions/libexceptions.la
......
......@@ -13,6 +13,7 @@ CLEANFILES = *.gcno *.gcda
bin_PROGRAMS = b10-host
b10_host_SOURCES = host.cc
b10_host_LDADD = $(top_builddir)/src/lib/dns/libdns++.la
b10_host_LDADD += $(top_builddir)/src/lib/util/libutil.la
b10_host_LDADD += $(top_builddir)/src/lib/exceptions/libexceptions.la
man_MANS = b10-host.1
......
......@@ -78,7 +78,7 @@ specified, it will appear once for each address.
% RESOLVER_FORWARD_QUERY processing forward query
This is a debug message indicating that a query received by the resolver
has passed a set of checks (message is well-formed, it is allowed by the
ACL, it is a supported opcode etc.) and is being forwarded to upstream
ACL, it is a supported opcode, etc.) and is being forwarded to upstream
servers.
% RESOLVER_HEADER_ERROR message received, exception when processing header: %1
......@@ -116,7 +116,7 @@ so is returning a REFUSED response to the sender.
% RESOLVER_NORMAL_QUERY processing normal query
This is a debug message indicating that the query received by the resolver
has passed a set of checks (message is well-formed, it is allowed by the
ACL, it is a supported opcode etc.) and is being processed the resolver.
ACL, it is a supported opcode, etc.) and is being processed by the resolver.
% RESOLVER_NOTIFY_RECEIVED NOTIFY arrived but server is not authoritative
The resolver has received a NOTIFY message. As the server is not
......
......@@ -49,14 +49,14 @@ An unknown command has been sent to the stats-httpd module. The
stats-httpd module will respond with an error, and the command will
be ignored.
% STATHTTPD_SERVER_ERROR http server error: %1
An internal error occurred while handling an http request. A HTTP 500
% STATHTTPD_SERVER_ERROR HTTP server error: %1
An internal error occurred while handling an HTTP request. An HTTP 500
response will be sent back, and the specific error is printed. This
is an error condition that likely points to a module that is not
responding correctly to statistic requests.
% STATHTTPD_SERVER_INIT_ERROR http server initialization error: %1
There was a problem initializing the http server in the stats-httpd
% STATHTTPD_SERVER_INIT_ERROR HTTP server initialization error: %1
There was a problem initializing the HTTP server in the stats-httpd
module upon receiving its configuration data. The most likely cause
is a port binding problem or a bad configuration value. The specific
error is printed in the message. The new configuration is ignored,
......@@ -65,8 +65,8 @@ and an error is sent back.
% STATHTTPD_SHUTDOWN shutting down
The stats-httpd daemon is shutting down.
% STATHTTPD_START_SERVER_INIT_ERROR http server initialization error: %1
There was a problem initializing the http server in the stats-httpd
% STATHTTPD_START_SERVER_INIT_ERROR HTTP server initialization error: %1
There was a problem initializing the HTTP server in the stats-httpd
module upon startup. The most likely cause is that it was not able
to bind to the listening port. The specific error is printed, and the
module will shut down.
......
......@@ -48,7 +48,7 @@ There was a problem reading from the command and control channel. The
most likely cause is that the msgq daemon is not running.
% XFROUT_CC_SESSION_TIMEOUT_ERROR timeout waiting for cc response
There was a problem reading a response from antoher module over the
There was a problem reading a response from another module over the
command and control channel. The most likely cause is that the
configuration manager b10-cfgmgr is not running.
......
......@@ -6,11 +6,13 @@ pkglibexec_SCRIPTS = b10-zonemgr
b10_zonemgrdir = $(pkgdatadir)
b10_zonemgr_DATA = zonemgr.spec
pyexec_DATA = zonemgr_messages.py
CLEANFILES = b10-zonemgr zonemgr.pyc zonemgr.spec
CLEANFILES = b10-zonemgr zonemgr.pyc zonemgr.spec
CLEANFILES += zonemgr_messages.py zonemgr_messages.pyc
man_MANS = b10-zonemgr.8
EXTRA_DIST = $(man_MANS) b10-zonemgr.xml
EXTRA_DIST = $(man_MANS) b10-zonemgr.xml zonemgr_messages.mes
if ENABLE_MAN
......@@ -19,6 +21,10 @@ b10-zonemgr.8: b10-zonemgr.xml
endif
# Build logging source file from message files
zonemgr_messages.py: zonemgr_messages.mes
$(top_builddir)/src/lib/log/compiler/message -p $(top_srcdir)/src/bin/zonemgr/zonemgr_messages.mes
zonemgr.spec: zonemgr.spec.pre
$(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" zonemgr.spec.pre >$@
......
......@@ -37,6 +37,16 @@ from isc.datasrc import sqlite3_ds
from optparse import OptionParser, OptionValueError
from isc.config.ccsession import *
import isc.util.process
from zonemgr_messages import *
# Initialize logging for called modules.
isc.log.init("b10-zonemgr")
logger = isc.log.Logger("zonemgr")
# Constants for debug levels, to be removed when we have #1074.
DBG_START_SHUT = 0
DBG_ZONEMGR_COMMAND = 10
DBG_ZONEMGR_BASIC = 40
isc.util.process.rename()
......@@ -77,13 +87,6 @@ REFRESH_OFFSET = 3
RETRY_OFFSET = 4
EXPIRED_OFFSET = 5
# verbose mode
VERBOSE_MODE = False
def log_msg(msg):
if VERBOSE_MODE:
sys.stdout.write("[b10-zonemgr] %s\n" % str(msg))
class ZonemgrException(Exception):
pass
......@@ -93,7 +96,6 @@ class ZonemgrRefresh:
do zone refresh.
Zone timers can be started by calling run_timer(), and it
can be stopped by calling shutdown() in another thread.
"""
def __init__(self, cc, db_file, slave_socket, config_data):
......@@ -157,6 +159,7 @@ class ZonemgrRefresh:
def zone_refresh_success(self, zone_name_class):
"""Update zone info after zone refresh success"""
if (self._zone_not_exist(zone_name_class)):
logger.error(ZONEMGR_UNKNOWN_ZONE_SUCCESS, zone_name_class[0], zone_name_class[1])
raise ZonemgrException("[b10-zonemgr] Zone (%s, %s) doesn't "
"belong to zonemgr" % zone_name_class)
self.zonemgr_reload_zone(zone_name_class)
......@@ -167,6 +170,7 @@ class ZonemgrRefresh:
def zone_refresh_fail(self, zone_name_class):
"""Update zone info after zone refresh fail"""
if (self._zone_not_exist(zone_name_class)):
logger.error(ZONEMGR_UNKNOWN_ZONE_FAIL, zone_name_class[0], zone_name_class[1])
raise ZonemgrException("[b10-zonemgr] Zone (%s, %s) doesn't "
"belong to zonemgr" % zone_name_class)
# Is zone expired?
......@@ -179,6 +183,7 @@ class ZonemgrRefresh:
def zone_handle_notify(self, zone_name_class, master):
"""Handle zone notify"""
if (self._zone_not_exist(zone_name_class)):
logger.error(ZONEMGR_UNKNOWN_ZONE_NOTIFIED, zone_name_class[0], zone_name_class[1])
raise ZonemgrException("[b10-zonemgr] Notified zone (%s, %s) "
"doesn't belong to zonemgr" % zone_name_class)
self._set_zone_notifier_master(zone_name_class, master)
......@@ -191,10 +196,12 @@ class ZonemgrRefresh:
def zonemgr_add_zone(self, zone_name_class):
""" Add a zone into zone manager."""
log_msg("Loading zone (%s, %s)" % zone_name_class)
logger.debug(DBG_ZONEMGR_BASIC, ZONEMGR_LOAD_ZONE, zone_name_class[0], zone_name_class[1])
zone_info = {}
zone_soa = sqlite3_ds.get_zone_soa(str(zone_name_class[0]), self._db_file)
if not zone_soa:
logger.error(ZONEMGR_NO_SOA, zone_name_class[0], zone_name_class[1])
raise ZonemgrException("[b10-zonemgr] zone (%s, %s) doesn't have soa." % zone_name_class)
zone_info["zone_soa_rdata"] = zone_soa[7]
zone_info["zone_state"] = ZONE_OK
......@@ -265,7 +272,7 @@ class ZonemgrRefresh:
except isc.cc.session.SessionTimeout:
pass # for now we just ignore the failure
except socket.error:
sys.stderr.write("[b10-zonemgr] Failed to send to module %s, the session has been closed." % module_name)
logger.error(ZONEMGR_SEND_FAIL, module_name)
def _find_need_do_refresh_zone(self):
"""Find the first zone need do refresh, if no zone need
......@@ -274,7 +281,8 @@ class ZonemgrRefresh:
zone_need_refresh = None
for zone_name_class in self._zonemgr_refresh_info.keys():
zone_state = self._get_zone_state(zone_name_class)
# If hasn't received refresh response but are within refresh timeout, skip the zone
# If hasn't received refresh response but are within refresh
# timeout, skip the zone
if (ZONE_REFRESHING == zone_state and
(self._get_zone_refresh_timeout(zone_name_class) > self._get_current_time())):
continue
......@@ -294,7 +302,7 @@ class ZonemgrRefresh:
def _do_refresh(self, zone_name_class):
"""Do zone refresh."""
log_msg("Do refresh for zone (%s, %s)." % zone_name_class)
logger.debug(DBG_ZONEMGR_BASIC, ZONEMGR_REFRESH_ZONE, zone_name_class[0], zone_name_class[1])
self._set_zone_state(zone_name_class, ZONE_REFRESHING)
self._set_zone_refresh_timeout(zone_name_class, self._get_current_time() + self._max_transfer_timeout)
notify_master = self._get_zone_notifier_master(zone_name_class)
......@@ -351,7 +359,7 @@ class ZonemgrRefresh:
if e.args[0] == errno.EINTR:
(rlist, wlist, xlist) = ([], [], [])
else:
sys.stderr.write("[b10-zonemgr] Error with select(); %s\n" % e)
logger.error(ZONEMGR_SELECT_ERROR, e);
break
for fd in rlist:
......@@ -365,12 +373,14 @@ class ZonemgrRefresh:
def run_timer(self, daemon=False):
"""
Keep track of zone timers. Spawns and starts a thread. The thread object is returned.
Keep track of zone timers. Spawns and starts a thread. The thread object
is returned.
You can stop it by calling shutdown().
"""
# Small sanity check
if self._running:
logger.error(ZONEMGR_TIMER_THREAD_RUNNING)
raise RuntimeError("Trying to run the timers twice at the same time")
# Prepare the launch
......@@ -395,6 +405,7 @@ class ZonemgrRefresh:
called from a different thread.
"""
if not self._running:
logger.error(ZONEMGR_NO_TIMER_THREAD)
raise RuntimeError("Trying to shutdown, but not running")
# Ask the thread to stop
......@@ -515,8 +526,8 @@ class Zonemgr:
return db_file
def shutdown(self):
"""Shutdown the zonemgr process. the thread which is keeping track of zone
timers should be terminated.
"""Shutdown the zonemgr process. The thread which is keeping track of
zone timers should be terminated.
"""
self._zone_refresh.shutdown()
......@@ -556,17 +567,17 @@ class Zonemgr:
# jitter should not be bigger than half of the original value
if config_data.get('refresh_jitter') > 0.5:
config_data['refresh_jitter'] = 0.5
log_msg("[b10-zonemgr] refresh_jitter is too big, its value will "
"be set to 0.5")
logger.warn(ZONEMGR_JITTER_TOO_BIG)
def _parse_cmd_params(self, args, command):
zone_name = args.get("zone_name")
if not zone_name:
logger.error(ZONEMGR_NO_ZONE_NAME)
raise ZonemgrException("zone name should be provided")
zone_class = args.get("zone_class")
if not zone_class:
logger.error(ZONEMGR_NO_ZONE_CLASS)
raise ZonemgrException("zone class should be provided")
if (command != ZONE_NOTIFY_COMMAND):
......@@ -574,6 +585,7 @@ class Zonemgr:
master_str = args.get("master")
if not master_str:
logger.error(ZONEMGR_NO_MASTER_ADDRESS)
raise ZonemgrException("master address should be provided")
return ((zone_name, zone_class), master_str)
......@@ -581,15 +593,16 @@ class Zonemgr:
def command_handler(self, command, args):
"""Handle command receivd from command channel.
ZONE_NOTIFY_COMMAND is issued by Auth process; ZONE_XFRIN_SUCCESS_COMMAND
and ZONE_XFRIN_FAILED_COMMAND are issued by Xfrin process; shutdown is issued
by a user or Boss process. """
ZONE_NOTIFY_COMMAND is issued by Auth process;
ZONE_XFRIN_SUCCESS_COMMAND and ZONE_XFRIN_FAILED_COMMAND are issued by
Xfrin process;
shutdown is issued by a user or Boss process. """
answer = create_answer(0)
if command == ZONE_NOTIFY_COMMAND:
""" Handle Auth notify command"""
# master is the source sender of the notify message.
zone_name_class, master = self._parse_cmd_params(args, command)
log_msg("Received notify command for zone (%s, %s)." % zone_name_class)
logger.debug(DBG_ZONEMGR_COMMAND, ZONEMGR_RECEIVE_NOTIFY, zone_name_class[0], zone_name_class[1])
with self._lock:
self._zone_refresh.zone_handle_notify(zone_name_class, master)
# Send notification to zonemgr timer thread
......@@ -598,6 +611,7 @@ class Zonemgr:
elif command == ZONE_XFRIN_SUCCESS_COMMAND:
""" Handle xfrin success command"""
zone_name_class = self._parse_cmd_params(args, command)
logger.debug(DBG_ZONEMGR_COMMAND, ZONEMGR_RECEIVE_XFRIN_SUCCESS, zone_name_class[0], zone_name_class[1])
with self._lock:
self._zone_refresh.zone_refresh_success(zone_name_class)
self._master_socket.send(b" ")# make self._slave_socket readble
......@@ -605,14 +619,17 @@ class Zonemgr:
elif command == ZONE_XFRIN_FAILED_COMMAND:
""" Handle xfrin fail command"""
zone_name_class = self._parse_cmd_params(args, command)
logger.debug(DBG_ZONEMGR_COMMAND, ZONEMGR_RECEIVE_XFRIN_FAILED, zone_name_class[0], zone_name_class[1])
with self._lock:
self._zone_refresh.zone_refresh_fail(zone_name_class)
self._master_socket.send(b" ")# make self._slave_socket readble
elif command == "shutdown":
logger.debug(DBG_ZONEMGR_COMMAND, ZONEMGR_RECEIVE_SHUTDOWN)
self.shutdown()
else:
logger.warn(ZONEMGR_RECEIVE_UNKNOWN, str(command))
answer = create_answer(1, "Unknown command:" + str(command))
return answer
......@@ -639,25 +656,29 @@ def set_cmd_options(parser):
if '__main__' == __name__:
try:
logger.debug(DBG_START_SHUT, ZONEMGR_STARTING)
parser = OptionParser()
set_cmd_options(parser)
(options, args) = parser.parse_args()
VERBOSE_MODE = options.verbose
if options.verbose:
logger.set_severity("DEBUG", 99)
set_signal_handler()
zonemgrd = Zonemgr()
zonemgrd.run()
except KeyboardInterrupt:
sys.stderr.write("[b10-zonemgr] exit zonemgr process\n")
logger.info(ZONEMGR_KEYBOARD_INTERRUPT)
except isc.cc.session.SessionError as e:
sys.stderr.write("[b10-zonemgr] Error creating zonemgr, "
"is the command channel daemon running?\n")
logger.error(ZONEMGR_SESSION_ERROR)
except isc.cc.session.SessionTimeout as e:
sys.stderr.write("[b10-zonemgr] Error creating zonemgr, "
"is the configuration manager running?\n")
logger.error(ZONEMGR_SESSION_TIMEOUT)
except isc.config.ModuleCCSessionError as e:
sys.stderr.write("[b10-zonemgr] exit zonemgr process: %s\n" % str(e))
logger.error(ZONEMGR_CCSESSION_ERROR, str(e))
if zonemgrd and zonemgrd.running:
zonemgrd.shutdown()
logger.debug(DBG_START_SHUT, ZONEMGR_SHUTDOWN)
# Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# No namespace declaration - these constants go in the global namespace
# of the zonemgr messages python module.
% ZONEMGR_CCSESSION_ERROR command channel session error: %1
An error was encountered on the command channel. The message indicates
the nature of the error.
% ZONEMGR_JITTER_TOO_BIG refresh_jitter is too big, setting to 0.5
The value specified in the configuration for the refresh jitter is too large
so its value has been set to the maximum of 0.5.
% ZONEMGR_KEYBOARD_INTERRUPT exiting zonemgr process as result of keyboard interrupt
An informational message output when the zone manager was being run at a
terminal and it was terminated via a keyboard interrupt signal.
% ZONEMGR_LOAD_ZONE loading zone %1 (class %2)
This is a debug message indicating that the zone of the specified class
is being loaded.
% ZONEMGR_NO_MASTER_ADDRESS internal BIND 10 command did not contain address of master
A command received by the zone manager from the Auth module did not
contain the address of the master server from which a NOTIFY message
was received. This may be due to an internal programming error; please
submit a bug report.
% ZONEMGR_NO_SOA zone %1 (class %2) does not have an SOA record
When loading the named zone of the specified class the zone manager
discovered that the data did not contain an SOA record. The load has
been abandoned.
% ZONEMGR_NO_TIMER_THREAD trying to stop zone timer thread but it is not running
An attempt was made to stop the timer thread (used to track when zones
should be refreshed) but it was not running. This may indicate an
internal program error. Please submit a bug report.
% ZONEMGR_NO_ZONE_CLASS internal BIND 10 command did not contain class of zone
A command received by the zone manager from another BIND 10 module did
not contain the class of the zone on which the zone manager should act.
This may be due to an internal programming error; please submit a
bug report.
% ZONEMGR_NO_ZONE_NAME internal BIND 10 command did not contain name of zone
A command received by the zone manager from another BIND 10 module did
not contain the name of the zone on which the zone manager should act.
This may be due to an internal programming error; please submit a
bug report.
% ZONEMGR_RECEIVE_NOTIFY received NOTIFY command for zone %1 (class %2)
This is a debug message indicating that the zone manager has received a
NOTIFY command over the command channel. The command is sent by the Auth
process when it is acting as a slave server for the zone and causes the
zone manager to record the master server for the zone and start a timer;
when the timer expires, the master will be polled to see if it contains
new data.
% ZONEMGR_RECEIVE_SHUTDOWN received SHUTDOWN command
This is a debug message indicating that the zone manager has received
a SHUTDOWN command over the command channel from the Boss process.
It will act on this command and shut down.
% ZONEMGR_RECEIVE_UNKNOWN received unknown command '%1'
This is a warning message indicating that the zone manager has received
the stated command over the command channel. The command is not known
to the zone manager and although the command is ignored, its receipt
may indicate an internal error. Please submit a bug report.
% ZONEMGR_RECEIVE_XFRIN_FAILED received XFRIN FAILED command for zone %1 (class %2)
This is a debug message indicating that the zone manager has received
an XFRIN FAILED command over the command channel. The command is sent
by the Xfrin process when a transfer of zone data into the system has
failed, and causes the zone manager to schedule another transfer attempt.
% ZONEMGR_RECEIVE_XFRIN_SUCCESS received XFRIN SUCCESS command for zone %1 (class %2)
This is a debug message indicating that the zone manager has received
an XFRIN SUCCESS command over the command channel. The command is sent
by the Xfrin process when the transfer of zone data into the system has
succeeded, and causes the data to be loaded and served by BIND 10.
% ZONEMGR_REFRESH_ZONE refreshing zone %1 (class %2)
The zone manager is refreshing the named zone of the specified class
with updated information.
% ZONEMGR_SELECT_ERROR error with select(): %1
An attempt to wait for input from a socket failed. The failing operation
is a call to the operating system's select() function, which failed for
the given reason.
% ZONEMGR_SEND_FAIL failed to send command to %1, session has been closed
The zone manager attempted to send a command to the named BIND 10 module,
but the send failed. The session between the modules has been closed.
% ZONEMGR_SESSION_ERROR unable to establish session to command channel daemon
The zonemgr process was not able to be started because it could not
connect to the command channel daemon. The most usual cause of this
problem is that the daemon is not running.
% ZONEMGR_SESSION_TIMEOUT timeout on session to command channel daemon
The zonemgr process was not able to be started because it timed out when
connecting to the command channel daemon. The most usual cause of this
problem is that the daemon is not running.
% ZONEMGR_SHUTDOWN zone manager has shut down
A debug message, output when the zone manager has shut down completely.
% ZONEMGR_STARTING zone manager starting
A debug message output when the zone manager starts up.
% ZONEMGR_TIMER_THREAD_RUNNING trying to start timer thread but one is already running
This message is issued when an attempt is made to start the timer
thread (which keeps track of when zones need a refresh) but one is
already running. It indicates either an error in the program logic or
a problem with stopping a previous instance of the timer. Please submit
a bug report.
% ZONEMGR_UNKNOWN_ZONE_FAIL zone %1 (class %2) is not known to the zone manager
An XFRIN operation has failed but the zone that was the subject of the
operation is not being managed by the zone manager. This may indicate
an error in the program (as the operation should not have been initiated
if this were the case). Please submit a bug report.
% ZONEMGR_UNKNOWN_ZONE_NOTIFIED notified zone %1 (class %2) is not known to the zone manager
A NOTIFY was received but the zone that was the subject of the operation
is not being managed by the zone manager. This may indicate an error
in the program (as the operation should not have been initiated if this