summaryrefslogtreecommitdiffstats
path: root/src/lib/python
diff options
context:
space:
mode:
authorMukund Sivaraman <muks@isc.org>2013-07-17 15:00:20 +0200
committerMukund Sivaraman <muks@isc.org>2013-07-17 15:00:20 +0200
commitcd9d3e1a07cba7cabf1118ffec7f7dacebc0ecfe (patch)
treeceb59e7597817ae5b364b7fb704b08cf4c98a5a3 /src/lib/python
parent[2856] Log when the MemorySegmentBuilder receives a bad command (diff)
downloadkea-cd9d3e1a07cba7cabf1118ffec7f7dacebc0ecfe.tar.xz
kea-cd9d3e1a07cba7cabf1118ffec7f7dacebc0ecfe.zip
[2856] Log errors when using the ZoneWriter
Diffstat (limited to 'src/lib/python')
-rw-r--r--src/lib/python/isc/memmgr/builder.py8
-rw-r--r--src/lib/python/isc/memmgr/memmgr_messages.mes14
2 files changed, 18 insertions, 4 deletions
diff --git a/src/lib/python/isc/memmgr/builder.py b/src/lib/python/isc/memmgr/builder.py
index b5375aad7b..0b2700637e 100644
--- a/src/lib/python/isc/memmgr/builder.py
+++ b/src/lib/python/isc/memmgr/builder.py
@@ -110,16 +110,16 @@ class MemorySegmentBuilder:
result, writer = clist.get_cached_zone_writer(zone_name, catch_load_error,
dsrc_name)
if result != ConfigurableClientList.CACHE_STATUS_ZONE_SUCCESS:
- # FIXME: log the error
+ logger.error(MEMMGR_BUILDER_GET_ZONE_WRITER_ERROR, zone_name, dsrc_name)
continue
try:
error = writer.load()
if error is not None:
- # FIXME: log the error
+ logger.error(MEMMGR_BUILDER_ZONE_WRITER_LOAD_1_ERROR, zone_name, dsrc_name, error)
continue
- except Exception:
- # FIXME: log it
+ except Exception as e:
+ logger.error(MEMMGR_BUILDER_ZONE_WRITER_LOAD_2_ERROR, zone_name, dsrc_name, str(e))
continue
writer.install()
writer.cleanup()
diff --git a/src/lib/python/isc/memmgr/memmgr_messages.mes b/src/lib/python/isc/memmgr/memmgr_messages.mes
index 23add5234d..3625b019fe 100644
--- a/src/lib/python/isc/memmgr/memmgr_messages.mes
+++ b/src/lib/python/isc/memmgr/memmgr_messages.mes
@@ -19,3 +19,17 @@
The MemorySegmentBuilder has received a bad command in its input command
queue. This is likely a programming error. If the builder runs in a
separate thread, this would cause it to exit the thread.
+
+% MEMMGR_BUILDER_GET_ZONE_WRITER_ERROR Unable to get zone writer for zone '%1', data source '%2'. Skipping.
+The MemorySegmentBuilder was unable to get a ZoneWriter for the
+specified zone when handling the load command. This zone will be
+skipped.
+
+% MEMMGR_BUILDER_ZONE_WRITER_LOAD_1_ERROR Error loading zone '%1', data source '%2': '%3'
+The MemorySegmentBuilder failed to load the specified zone when handling
+the load command. This zone will be skipped.
+
+% MEMMGR_BUILDER_ZONE_WRITER_LOAD_2_ERROR Error loading zone '%1', data source '%2': '%3'
+An exception occured when the MemorySegmentBuilder tried to load the
+specified zone when handling the load command. This zone will be
+skipped.