]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Reset interactive-on-error the first time it triggers
authorDan Mick <dan.mick@redhat.com>
Tue, 13 Jan 2015 23:11:00 +0000 (15:11 -0800)
committerDan Mick <dan.mick@redhat.com>
Tue, 13 Jan 2015 23:16:23 +0000 (15:16 -0800)
This way one only drops into the REPL once.  (It's possible
that it may be useful to configure this behavior, but I think
that's lily-gilding.)

Fixes: #10529
Signed-off-by: Dan Mick <dan.mick@redhat.com>
teuthology/contextutil.py
teuthology/run_tasks.py

index f13c570f9fb16fc8bf489d6fdfc1b860b62986e1..68670329aaa58264aaf5ebf52b92919e15a2dc90 100644 (file)
@@ -33,6 +33,7 @@ def nested(*managers):
         exc = sys.exc_info()
         # FIXME this needs to be more generic
         if config.ctx and config.ctx.config.get('interactive-on-error'):
+            config.ctx.config['interactive-on-error'] = False
             from .task import interactive
             log.warning('Saw failure, going into interactive mode...')
             interactive.task(ctx=config.ctx, config=None)
index f2d3f2ae510c2e4a05380029aaab8afa4e75902a..49a0fd93e60636bf926f41ea0ab5ddaec883a3f2 100644 (file)
@@ -97,6 +97,7 @@ def run_tasks(tasks, ctx):
             ctx.summary['sentry_event'] = event_url
 
         if ctx.config.get('interactive-on-error'):
+            ctx.config['interactive-on-error'] = False
             from .task import interactive
             log.warning('Saw failure during task execution, going into interactive mode...')
             interactive.task(ctx=ctx, config=None)