utilities/utilities/logmgmt/scripts
Zhixiong Chi ef0fc68079 Reorder logmgmt after crash-dump-manager.service
Sometimes we got a truncated vmcore file after sysrq magic key.
This is most likely not an issue with generating the vmcore file
itself, but rather an issue generating the tar archive.

Assume that the system has crashed, and the kdump kernel has
booted up, and the vmcore file has been saved to "/var/crash/".
The system then reboots into "normal mode". During the normal
boot-up, the order of the logmgmt and crashDumpMgr systemd
services is not constrained to the correct order via systemd
unit dependencies.

This results in the following:
Sometimes, after a crash, logmgmt daemon is started before
crashDumpMgr can save the vmcore file tar archive from /var/crash
to /var/log/crash/vmcore*.tar. Because of this, logrotate called
by the logmgmt daemon grabs a partial copy of the vmcore tar file,
and then the logrotate compresses the partial vmcore tar file into
vmcore*.tar.gz.

All this to say, this issue is fixed by ensuring that logmgmt
daemon is started after crashDumpMgr finishes archiving the vmcore
into a tar file. After that, logrotate started by logmgmt daemon
will further compress the vmcore tar file into the vmcore tar.gz
file.

Now we add the systemd dependency crash-dump-manager for logmgmt
service to make sure that logmgmt daemon should wait for the
crashDumpMgr daemon to finish starting.

TestPlan:
PASS: build-pkgs; build-image
PASS: Jenkins Installation
PASS: Execute the testcycle 'sudo tee <<<c /proc/sysrq-trigger'
      and check the vmcore file after reboot.

Closes-Bug: 2042803

Change-Id: I7b7f8adeda0a1bb16529e2fab7fc4f1dfb87b932
Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
2023-11-07 21:54:20 -05:00
..
bin Update logmgmt to use python3 2020-05-20 01:55:15 +00:00
etc/systemd/system Reorder logmgmt after crash-dump-manager.service 2023-11-07 21:54:20 -05:00
init.d Fix bug in logmgmt start check 2019-05-03 14:48:56 -04:00
pmon.d Relocate logmgmt to stx-integ/logging/logmgmt 2018-08-01 12:18:49 -04:00