Commit 62c72fcd authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

Merge branch 'trac516'

parents a81bd162 3752558c
......@@ -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)
......
......@@ -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:
......
......@@ -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)
......
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