rhevm-qe-automation / ovirt-ansible

Ansible playbooks for ovirt management
GNU General Public License v3.0
26 stars 28 forks source link

Add task to save coredumps in hypervisor nodes #104

Closed KKoukiou closed 7 years ago

KKoukiou commented 7 years ago

Wanted to add tag for this task so that it can be skippped on demand, but since the I83 is general I left it to be adjusted with the rest of the code.

KKoukiou commented 7 years ago

Looks like that in rhel and rhev-h machines coredumps are under /var/log/core

cat /proc/sys/kernel/core_pattern 
/var/log/core/core.%p.%t.dump

But this can be changed by user. Do we want to patameterize the coredump path?

KKoukiou commented 7 years ago

Added the head -n 1 after parsing dirpath because I got some redundant new lines else: ex:

[kkoukiou@katerina ovirt-ansible]$ cat /proc/sys/kernel/core_pattern | xargs dirname 
|/usr/libexec
.
.
.
.
.
.
.
.
[kkoukiou@katerina ovirt-ansible]$ cat /proc/sys/kernel/core_pattern 
|/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t %P %I