From 5b3ce845962d487c54f2ccf1743805a43a32faed Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Wed, 11 Sep 2013 15:17:22 -0500 Subject: [PATCH] Add ctx.config to sentry info. --- teuthology/run_tasks.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/teuthology/run_tasks.py b/teuthology/run_tasks.py index 64f42e9e24e..7a532f5f25c 100644 --- a/teuthology/run_tasks.py +++ b/teuthology/run_tasks.py @@ -3,6 +3,7 @@ import logging from .sentry import get_client as get_sentry_client from .misc import get_http_log_path from .config import config as teuth_config +from copy import deepcopy log = logging.getLogger(__name__) @@ -43,7 +44,16 @@ def run_tasks(tasks, ctx): 'owner': ctx.owner, } job_id = getattr(ctx, 'job_id', None) + + config = deepcopy(ctx.config) + # Remove ssh keys from reported config + if 'targets' in config: + targets = config['targets'] + for host in targets.keys(): + targets[host] = '' + extra = { + 'config': config, 'logs': get_http_log_path(ctx.archive, job_id), } exc_id = sentry.get_ident(sentry.captureException(