From: Sage Weil Date: Thu, 4 Mar 2021 16:28:21 +0000 (-0600) Subject: task/internal: fix coredump path split X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fheads%2Ffix-core-split;p=teuthology.git 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 --- 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()