Skip to content

Commit c0410c9

Browse files
committed
teuthology/run_tasks.py: Add more loggings
Add more logging for debuging purposes and add exceptions to make trouble shooting easier. Fixes: https://tracker.ceph.com/issues/54372 Signed-off-by: Kamoltat Sirivadhna <[email protected]>
1 parent 35ea38a commit c0410c9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

teuthology/run_tasks.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,17 @@ def get_task(name):
2929

3030
# First look for the tasks's module inside teuthology
3131
module = _import('teuthology.task', module_name, task_name)
32+
log.debug("importing module_name: {} and task_name: {}".format(
33+
module_name,
34+
task_name,
35+
))
3236
# If it is not found, try qa/ directory (if it is in sys.path)
3337
if not module:
34-
module = _import('tasks', module_name, task_name, fail_on_import_error=True)
38+
try:
39+
module = _import('tasks', module_name, task_name, fail_on_import_error=True)
40+
except Exception as e:
41+
log.exception(str(e))
42+
raise
3543
try:
3644
# Attempt to locate the task object inside the module
3745
task = getattr(module, task_name)

0 commit comments

Comments
 (0)