From 166887dce237bc16ba4d591448b1af699882bc2c Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 4 Mar 2021 10:28:21 -0600 Subject: [PATCH] task/internal: fix coredump path split If the output is like core: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'systemd-sysusers', real uid: 0, effective uid: 0, real gid: 0, effective gid: 0, execfn: '/bin/systemd-sysusers', platform: 'x86_64' then there is no space; first discard the ' and what follows, and then discard anything after the space (if present!) Signed-off-by: Sage Weil --- teuthology/task/internal/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teuthology/task/internal/__init__.py b/teuthology/task/internal/__init__.py index b54c6110d..2f24717b7 100644 --- a/teuthology/task/internal/__init__.py +++ b/teuthology/task/internal/__init__.py @@ -315,7 +315,7 @@ def fetch_binaries_for_coredumps(path, remote): # Parse file output to get program, Example output: # 1422917770.7450.core: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, \ # from 'radosgw --rgw-socket-path /home/ubuntu/cephtest/apache/tmp.client.0/fastcgi_soc' - dump_program = dump_out.split("from '")[1].split(' ')[0] + dump_program = dump_out.split("from '")[1].split("'")[0].split(' ')[0] # Find path on remote server: remote_path = remote.sh(['which', dump_program]).rstrip() -- 2.47.3