Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pavel Zhukov
Kea
Commits
62c72fcd
Commit
62c72fcd
authored
Jan 20, 2011
by
JINMEI Tatuya
Browse files
Merge branch 'trac516'
parents
a81bd162
3752558c
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/bin/xfrin/xfrin.py.in
100644 → 100755
View file @
62c72fcd
...
...
@@ -521,8 +521,19 @@ class Xfrin:
msg = create_command(notify_out.ZONE_NEW_DATA_READY_CMD, param)
# catch the exception, in case msgq has been killed.
try:
self._send_cc_session.group_sendmsg(msg, XFROUT_MODULE_NAME)
self._send_cc_session.group_sendmsg(msg, ZONE_MANAGER_MODULE_NAME)
seq = self._send_cc_session.group_sendmsg(msg,
XFROUT_MODULE_NAME)
try:
answer, env = self._send_cc_session.group_recvmsg(False,
seq)
except isc.cc.session.SessionTimeout:
pass # for now we just ignore the failure
seq = self._send_cc_session.group_sendmsg(msg, ZONE_MANAGER_MODULE_NAME)
try:
answer, env = self._send_cc_session.group_recvmsg(False,
seq)
except isc.cc.session.SessionTimeout:
pass # for now we just ignore the failure
except socket.error as err:
log_error("Fail to send message to %s and %s, msgq may has been killed"
% (XFROUT_MODULE_NAME, ZONE_MANAGER_MODULE_NAME))
...
...
@@ -530,7 +541,12 @@ class Xfrin:
msg = create_command(ZONE_XFRIN_FAILED, param)
# catch the exception, in case msgq has been killed.
try:
self._send_cc_session.group_sendmsg(msg, ZONE_MANAGER_MODULE_NAME)
seq = self._send_cc_session.group_sendmsg(msg, ZONE_MANAGER_MODULE_NAME)
try:
answer, env = self._send_cc_session.group_recvmsg(False,
seq)
except isc.cc.session.SessionTimeout:
pass # for now we just ignore the failure
except socket.error as err:
log_error("Fail to send message to %s, msgq may has been killed"
% ZONE_MANAGER_MODULE_NAME)
...
...
src/bin/zonemgr/tests/zonemgr_test.py
View file @
62c72fcd
...
...
@@ -43,6 +43,9 @@ class MySession():
if
module_name
not
in
(
"Auth"
,
"Xfrin"
):
raise
ZonemgrTestException
(
"module name not exist"
)
def
group_recvmsg
(
self
,
nonblock
,
seq
):
return
None
,
None
class
MyZonemgrRefresh
(
ZonemgrRefresh
):
def
__init__
(
self
):
class
FakeConfig
:
...
...
src/bin/zonemgr/zonemgr.py.in
100644 → 100755
View file @
62c72fcd
...
...
@@ -266,7 +266,11 @@ class ZonemgrRefresh:
"""Send command between modules."""
msg = create_command(command_name, params)
try:
self._cc.group_sendmsg(msg, module_name)
seq = self._cc.group_sendmsg(msg, module_name)
try:
answer, env = self._cc.group_recvmsg(False, seq)
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)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment