aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2019-02-13 09:02:02 +0000
committerPeter Mikus <pmikus@cisco.com>2019-02-13 09:03:59 +0000
commit4b84a3d0620c827aa9bc9c36776af50a88a180f4 (patch)
tree54dea50aa227836d1abcf884fae7477d3b141df2
parentbbfcee8d3cf51ec01d269245970ef41bb072c580 (diff)
FIX: Coredump packing combination
- Remove DIR Change-Id: Iba1b03d407e93d4e60fb49f6b50747de87f82ac7 Signed-off-by: Peter Mikus <pmikus@cisco.com>
-rw-r--r--resources/libraries/python/CoreDumpUtil.py7
1 files 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)