metal/mtce/src/scripts
Enzo Candotti a120cc5fea Add new configuration parameters to crashDumpMgr
This commmit updates crashDumpMgr in order to add three new parameters
and enhance the existing one.

1. Maximum Files: Added 'max-files' parameter to specify the maximum
   number of saved crash dump files. The default value is 4.
2. Maximum Size: Updated the 'max-size' parameter to support
   the 'unlimited' value. The default value is 5GiB.
3. Maximum Used: Included 'max-used' parameter to limit the maximum
   storage used by saved crash dump files. It supports 'unlimited'
   and has a default value of unlimited.
4. Minimum Available: Implemented 'min-available' parameter, enabling
   the definition of a minimum available storage threshold on the
   crash dump file system. The value is restricted to a minimum of
   1GB and defaults to 10%.

These enhancements refine the crash dump management process and
offer more control over storage usage and crash dump file retention.

Story: 2010893
Task: 48676

Test Plan:
1) max-files parameter:
  PASS: don't set max-files param. Ensure the default value is used.
  Create 5 directories inside /var/crash. Each of them contains
  dmesg.<date> and dump.<date>. run the crashDumpMgr script.
  Verify:
    PASS: the vmcore_first.tar.1.gz is created when the first
          directory is read.
    PASS: 4 more vmcore_<date>.tar files are created.
    PASS: There will be 1 vmcore_first.tar.1.gz and 4
          vmcore_<date>.tar inside /var/log/crash.
    PASS: There will be one summary file for each direcory:
          <date>_dmesg.<date> inside /var/crash
2) max-size parameter
  PASS: don't set max-size param. Ensure the default value is used
        (5GiB).
  PASS: Set a fixed max-size param. Create a dump.<date> file greater
        that the max-size param. Run the crashDumpMgr script. Verify
        that the crash dump file is not generated and a log
        message is displayed.
3) max-used parameter:
  PASS: don't set max-used param. Ensure the default value is used
        (unlimited).
  PASS: Set a fixed max-used param. Create a dump.<date> file that
        will generate that the used space is greater that the
        max-used param. Run the crashDumpMgr script. Verify that
        the crash dump file is not generated, a log message is
        displayed and the directory is deleted.
4) min-available parameter:
  PASS: don't set min-available param. Ensure the default value is
        used (10% of /var/log/crash).
  PASS: Set a fixed 'min-available' param. Generate a 'dump.<date>'
        file to simulate a situation where the remaining space is
        less than the 'min-available' parameter. Run the crashDumpMgr
        script and ensure that it does not create the crashdump file,
        displays a log message, and deletes the entry.
5) PASS: Since the crashDumpMgr.service file is not being modified,
         verify that the script takes the default values.

Note: All tests have also been conducted by generating a kernel panic
and ensuring the crashDumpMgr script follows the correct workflow.

Change-Id: I8948593469dae01f190fd1ea21da3d0852bd7814
Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
2023-09-18 19:22:09 +00:00
..
collect_bmc.sh Add maintenance BMC info collect script 2020-10-15 15:41:51 -04:00
config Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
config.service Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
crashDumpMgr Add new configuration parameters to crashDumpMgr 2023-09-18 19:22:09 +00:00
crashDumpMgr.service Increase maximum preserved crash dump vmcore file size to 5Gi 2021-07-21 01:46:30 +00:00
crashdump.logrotate Modify mtce daemon log rotation config files 2021-04-07 20:47:54 +00:00
dmemchk.sh Remove Resource Monitor ; aka rmon, from the load 2019-03-19 16:12:38 -04:00
goenabled Add LSB headers to mtce service scripts 2019-08-29 11:20:14 -05:00
goenabled.service De-branding in starlingx/metal: Titanium Cloud -> StarlingX 2020-04-03 07:58:25 +02:00
hbs-query [Trivial Fix] fix typos in docstrings 2019-02-21 14:46:06 +08:00
hbsAgent Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
hbsClient Fix failing mtce services on Debian 2022-01-14 10:50:09 -03:00
hbsClient.conf Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
hbsClient.service De-branding in starlingx/metal: Titanium Cloud -> StarlingX 2020-04-03 07:58:25 +02:00
hwclock.service Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
hwclock.sh Fix remaining failing mtce services on Debian 2022-01-25 12:10:39 -03:00
mgmtlinkup Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
mtc.conf Increase mtce host offline threshold to handle slow host shutdown 2023-06-16 18:14:08 +00:00
mtc.ini Change compute node to worker node personality 2018-12-13 13:08:48 -05:00
mtcAgent mtcAgent: Run in active mode 2022-09-13 21:38:50 +00:00
mtcClient Fix remaining failing mtce services on Debian 2022-01-25 12:10:39 -03:00
mtcClient.conf Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
mtcClient.service De-branding in starlingx/metal: Titanium Cloud -> StarlingX 2020-04-03 07:58:25 +02:00
mtcTest Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
mtce.logrotate Modify mtce daemon log rotation config files 2021-04-07 20:47:54 +00:00
mtce.syslog Setup mtce logfile config 2020-10-16 10:43:01 -04:00
mtcinit Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
mtclog Fix failing mtce services on Debian 2022-01-14 10:50:09 -03:00
mtclog.service De-branding in starlingx/metal: Titanium Cloud -> StarlingX 2020-04-03 07:58:25 +02:00
mtclogd.conf Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
runservices Add LSB headers to mtce service scripts 2019-08-29 11:20:14 -05:00
runservices.service De-branding in starlingx/metal: Titanium Cloud -> StarlingX 2020-04-03 07:58:25 +02:00
sched_trace Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
sensor_hp360_v1_ilo_v4.profile Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
sensor_hp380_v1_ilo_v4.profile Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
sensor_integration_profile.README Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
sensor_quanta_v1_ilo_v4.profile Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
store_trace Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
stress_ras.sh Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
stress_swact.sh Decouple Guest-server/agent from stx-metal 2018-09-18 17:15:08 -04:00
wipedisk Add mpath support to wipedisk script 2023-04-10 17:10:22 -03:00