Have the blanket 'except' clauses in the scheduler/executor print the traceback.
diff --git a/mysos/executor/executor.py b/mysos/executor/executor.py
index 8019c40..1ffbb51 100644
--- a/mysos/executor/executor.py
+++ b/mysos/executor/executor.py
@@ -1,4 +1,5 @@
import json
+import traceback
from mysos.common.decorators import logged
@@ -77,6 +78,7 @@
self._send_update(task.task_id.value, mesos_pb2.TASK_FAILED)
except Exception as e:
log.error("Error occurred while executing the task: %s" % e)
+ log.error(traceback.format_exc())
# Send TASK_LOST for unknown errors.
self._send_update(task.task_id.value, mesos_pb2.TASK_LOST)
diff --git a/mysos/scheduler/scheduler.py b/mysos/scheduler/scheduler.py
index b3f0139..8c1e36d 100644
--- a/mysos/scheduler/scheduler.py
+++ b/mysos/scheduler/scheduler.py
@@ -3,6 +3,7 @@
import posixpath
import random
import threading
+import traceback
import sys
from mysos.common.cluster import get_cluster_path
@@ -240,6 +241,7 @@
self._recover()
except Exception as e:
log.error("Stopping scheduler because: %s" % e)
+ log.error(traceback.format_exc())
self._stop()
return