[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] Make rrdtool errors non-fatal to reduce distruption.



---
 dak/graph.py        |    5 ++++-
 dak/queue_report.py |    7 +++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/dak/graph.py b/dak/graph.py
index 9afc02e..899549a 100755
--- a/dak/graph.py
+++ b/dak/graph.py
@@ -96,7 +96,10 @@ GPRINT:avgds0:\tAvg\\: %%3.0lf\\j
 """ % (rrd_file, rrd_file, name.upper())).strip().split("\n")
 
     rrd_args += extra_args
-    rrdtool.graph(*rrd_args)
+    try:
+        ret = rrdtool.graph(*rrd_args)
+    except rrdtool.error as e:
+        print('warning: graph: rrdtool error, skipping %s-%s.png: %s' % (name, graph, e))
 
 ################################################################################
 
diff --git a/dak/queue_report.py b/dak/queue_report.py
index 19673d5..a929a4b 100755
--- a/dak/queue_report.py
+++ b/dak/queue_report.py
@@ -350,8 +350,11 @@ RRA:MAX:0.5:6:700
 RRA:MAX:0.5:24:775
 RRA:MAX:0.5:288:795
 """.strip().split("\n")
-        rrdtool.create(*create)
-        rrdtool.update(*update)
+        try:
+            rc = rrdtool.create(*create)
+            ru = rrdtool.update(*update)
+        except rrdtool.error as e:
+            print('warning: queue_report: rrdtool error, skipping %s.rrd: %s' % (type, e))
     except NameError:
         pass
 
-- 
1.5.6.5



Reply to: