[svn] commit: r2619 - in /branches/trac289/src: bin/xfrin/xfrin.py.in lib/python/isc/notify/notify_out.py
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Aug 3 02:12:05 UTC 2010
Author: zhanglikun
Date: Tue Aug 3 02:12:05 2010
New Revision: 2619
Log:
When zone transfer finishing, it will send the same command to zone manager and xfrout module, so the zone manager can reset the timer for the next refresh, and xfrout module will notify the zones' slaves.
Modified:
branches/trac289/src/bin/xfrin/xfrin.py.in
branches/trac289/src/lib/python/isc/notify/notify_out.py
Modified: branches/trac289/src/bin/xfrin/xfrin.py.in
==============================================================================
--- branches/trac289/src/bin/xfrin/xfrin.py.in (original)
+++ branches/trac289/src/bin/xfrin/xfrin.py.in Tue Aug 3 02:12:05 2010
@@ -51,6 +51,7 @@
AUTH_SPECFILE_LOCATION = AUTH_SPECFILE_PATH + "/auth.spec"
XFROUT_MODULE_NAME = 'Xfrout'
+ZONE_MANAGER_MODULE_NAME = 'Zonemgr'
__version__ = 'BIND10'
# define xfrin rcode
XFRIN_OK = 0
@@ -194,7 +195,7 @@
self._handle_xfrin_response)
self.log_msg(logstr + 'succeeded')
- self._server.send_notify_command(self._zone_name)
+ self._server.publish_xfr_finish_news(self._zone_name)
ret = XFRIN_OK
except XfrinException as e:
@@ -449,11 +450,13 @@
return answer
- def send_notify_command(self, zone_name):
- '''Send Notify command to xfrout module.'''
+ def publish_xfr_finish_news(self, zone_name):
+ '''Send command to xfrout/zone manager module, that
+ xfr has finished for one zone, new zone data is ready.'''
param = {'zone_name': zone_name}
- msg = create_command(notify_out.ZONE_NOTIFY_CMD, param)
+ msg = create_command(notify_out.ZONE_NEW_DATA_READY_CMD, param)
self._send_cc_session.group_sendmsg(msg, XFROUT_MODULE_NAME)
+ self._send_cc_session.group_sendmsg(msg, ZONE_MANAGER_MODULE_NAME)
def _parse_cmd_params(self, args):
zone_name = args.get('zone_name')
Modified: branches/trac289/src/lib/python/isc/notify/notify_out.py
==============================================================================
--- branches/trac289/src/lib/python/isc/notify/notify_out.py (original)
+++ branches/trac289/src/lib/python/isc/notify/notify_out.py Tue Aug 3 02:12:05 2010
@@ -11,7 +11,7 @@
# C++ loadable module may not be installed;
sys.stderr.write('[b10-xfrout] failed to import DNS or XFR module: %s\n' % str(e))
-ZONE_NOTIFY_CMD = 'zone_new_data_ready'
+ZONE_NEW_DATA_READY_CMD = 'zone_new_data_ready'
_MAX_NOTIFY_NUM = 30
_MAX_NOTIFY_TRY_NUM = 5
_EVENT_NONE = 0
More information about the bind10-changes
mailing list