]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
task/internal: fix coredump path split fix-core-split
authorSage Weil <sage@newdream.net>
Thu, 4 Mar 2021 16:28:21 +0000 (10:28 -0600)
committerSage Weil <sage@newdream.net>
Thu, 4 Mar 2021 16:28:21 +0000 (10:28 -0600)
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 <sage@newdream.net>
teuthology/task/internal/__init__.py

index b54c6110d214f0c141a6bde555132ef57b0cd512..2f24717b7fd208cc8311bee2e3e2d1fdb21af2c6 100644 (file)
@@ -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()