From 799e7b353c417eb3c45d074782f32f815c013c61 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Mon, 17 Jan 2022 13:38:41 -0700 Subject: [PATCH] task.internal: Skip coredump on containers Signed-off-by: Zack Cerza --- teuthology/task/internal/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/teuthology/task/internal/__init__.py b/teuthology/task/internal/__init__.py index a35186e13f..d85b3f212e 100644 --- a/teuthology/task/internal/__init__.py +++ b/teuthology/task/internal/__init__.py @@ -444,9 +444,10 @@ def coredump(ctx, config): Stash a coredump of this system if an error occurs. """ log.info('Enabling coredump saving...') + cluster = ctx.cluster.filter(lambda r: not r.is_container) archive_dir = misc.get_archive_dir(ctx) run.wait( - ctx.cluster.run( + cluster.run( args=[ 'install', '-d', '-m0755', '--', '{adir}/coredump'.format(adir=archive_dir), @@ -465,8 +466,9 @@ def coredump(ctx, config): try: yield finally: + cluster = ctx.cluster.filter(lambda r: not r.is_container) run.wait( - ctx.cluster.run( + cluster.run( args=[ 'sudo', 'sysctl', '-w', 'kernel.core_pattern=core', run.Raw('&&'), @@ -487,7 +489,7 @@ def coredump(ctx, config): # set status = 'fail' if the dir is still there = coredumps were # seen - for rem in ctx.cluster.remotes.keys(): + for rem in cluster.remotes.keys(): try: rem.sh("test -e " + archive_dir + "/coredump") except run.CommandFailedError: -- 2.39.5