aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Elkins <melkins@tislabs.com>2016-04-27 17:01:26 +0000
committerMichael Elkins <melkins@tislabs.com>2016-04-27 17:01:26 +0000
commitbf96f5f690cb418ed00f77a32f692015b03a4969 (patch)
tree318337ad4fa1652608fca480dafe7b1092237050
parent883112a925885a7dcfcbdaaa4d748e16140f8389 (diff)
Catch exceptions from Zookeeper to gracefully continue when we can't talk to rpkid.
closes #805 svn path=/branches/tk705/; revision=6394
-rw-r--r--rpki/gui/gui_rpki_cache/util.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/rpki/gui/gui_rpki_cache/util.py b/rpki/gui/gui_rpki_cache/util.py
index 4798447b..0bc4fa5d 100644
--- a/rpki/gui/gui_rpki_cache/util.py
+++ b/rpki/gui/gui_rpki_cache/util.py
@@ -215,8 +215,15 @@ def fetch_published_objects():
type = "query", version = rpki.left_right.version)
for h in handles:
SubElement(q_msg, rpki.left_right.tag_list_published_objects, tenant_handle=h, tag=h)
- z = Zookeeper()
- r_msg = z.call_rpkid(q_msg)
+ try:
+ z = Zookeeper()
+ r_msg = z.call_rpkid(q_msg)
+ except Exception as err:
+ logger.error('Unable to connect to rpkid to fetch list of published objects')
+ logger.exception(err)
+ # Should be safe to continue processing the rcynic cache, we just don't do any notifications
+ return
+
for r_pdu in r_msg:
if r_pdu.tag == rpki.left_right.tag_list_published_objects:
# Look up the object in the rcynic cache