From 4b84a3d0620c827aa9bc9c36776af50a88a180f4 Mon Sep 17 00:00:00 2001 From: Peter Mikus Date: Wed, 13 Feb 2019 09:02:02 +0000 Subject: FIX: Coredump packing combination - Remove DIR Change-Id: Iba1b03d407e93d4e60fb49f6b50747de87f82ac7 Signed-off-by: Peter Mikus --- resources/libraries/python/CoreDumpUtil.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/libraries/python/CoreDumpUtil.py b/resources/libraries/python/CoreDumpUtil.py index 7843a59c09..ea79124faa 100644 --- a/resources/libraries/python/CoreDumpUtil.py +++ b/resources/libraries/python/CoreDumpUtil.py @@ -132,11 +132,12 @@ class CoreDumpUtil(object): uuid = str(time()).replace('.', '') name = '{uuid}.tar.lzo.lrz.xz'.format(uuid=uuid) - command = ('[ -e {dir}/*.core ] && sudo tar c {dir}/*.core | ' + command = ('[ -e {dir}/*.core ] && cd {dir} && ' + 'sudo tar c *.core | ' 'lzop -1 | ' 'lrzip -n -T -p 1 -w 5 | ' - 'xz -9e > {dir}/{name} && ' - 'sudo rm -f {dir}/*.core' + 'xz -9e > {name} && ' + 'sudo rm -f *.core' .format(dir=Constants.CORE_DUMP_DIR, name=name)) try: exec_cmd_no_error(node, command, timeout=3600) -- cgit 1.2.3-korg