]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Add ctx.config to sentry info.
authorZack Cerza <zack@cerza.org>
Wed, 11 Sep 2013 20:17:22 +0000 (15:17 -0500)
committerZack Cerza <zack@cerza.org>
Wed, 11 Sep 2013 20:31:31 +0000 (15:31 -0500)
teuthology/run_tasks.py

index 64f42e9e24e9cddb09c66fc5a9a592d2fe119553..7a532f5f25cbcf2a5c6e4dac6dc96b6092611c90 100644 (file)
@@ -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] = '<redacted>'
+
             extra = {
+                'config': config,
                 'logs': get_http_log_path(ctx.archive, job_id),
             }
             exc_id = sentry.get_ident(sentry.captureException(