- uuid = str(time()).replace('.', '')
- name = '{uuid}.tar.lzo.lrz.xz'.format(uuid=uuid)
-
- command = ('[ -e {dir}/*.core ] && cd {dir} && '
- 'sudo tar c *.core | '
- 'lzop -1 | '
- 'lrzip -n -T -p 1 -w 5 | '
- 'xz -9e > {name} && '
- 'sudo rm -f *.core'
- .format(dir=Constants.CORE_DUMP_DIR, name=name))
- try:
- exec_cmd_no_error(node, command, timeout=3600)
- if disable_on_success:
- self.set_core_limit_disabled()
- except RuntimeError:
- # If compress was not sucessfull ignore error and skip further
- # processing.
- continue
-
- local_path = 'archive/{name}'.format(name=name)
- remote_path = '{dir}/{name}'.format(dir=Constants.CORE_DUMP_DIR,
- name=name)
- try:
- scp_node(node, local_path, remote_path, get=True, timeout=3600)
- command = 'rm -f {dir}/{name}'\
- .format(dir=Constants.CORE_DUMP_DIR, name=name)
- exec_cmd_no_error(node, command, sudo=True)
- except RuntimeError:
- pass
+ if node[u"type"] == NodeType.DUT:
+ command = (
+ f"for f in {Constants.CORE_DUMP_DIR}/*.core; do "
+ f"sudo gdb /usr/bin/vpp ${{f}} "
+ f"-ex 'source -v {Constants.REMOTE_FW_DIR}"
+ f"/resources/tools/scripts/gdb-commands' -ex quit; "
+ f"sudo rm -f ${{f}}; done"
+ )
+ try:
+ exec_cmd_no_error(node, command, timeout=3600)
+ if disable_on_success:
+ self.set_core_limit_disabled()
+ except RuntimeError:
+ # If compress was not successful ignore error and skip
+ # further processing.
+ continue