From 7a3e1808cf4aadd704da33fc3eb0ab55309ff3a7 Mon Sep 17 00:00:00 2001 From: Steve Traylen Date: Tue, 5 Dec 2023 12:32:17 +0100 Subject: [PATCH] Correct coredump parameter from MaxFree to KeepFree Incorrect coredump paramters were added. It should be `KeepFree` and `MaxFree` was never valid. https://www.freedesktop.org/software/systemd/man/latest/coredump.conf.html#MaxUse= * Fixes #398 --- REFERENCE.md | 2 +- spec/type_aliases/systemd_coredumpsettings_spec.rb | 5 +++-- types/coredumpsettings.pp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 7ed830c5..1eec9e38 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -2095,7 +2095,7 @@ Struct[{ Optional['ExternalSizeMax'] => Pattern[/^[0-9]+(K|M|G|T|P|E)?$/], Optional['JournalSizeMax'] => Pattern[/^[0-9]+(K|M|G|T|P|E)?$/], Optional['MaxUse'] => Pattern[/^[0-9]+(K|M|G|T|P|E)?$/], - Optional['MaxFree'] => Pattern[/^[0-9]+(K|M|G|T|P|E)?$/], + Optional['KeepFree'] => Pattern[/^[0-9]+(K|M|G|T|P|E)?$/], }] ``` diff --git a/spec/type_aliases/systemd_coredumpsettings_spec.rb b/spec/type_aliases/systemd_coredumpsettings_spec.rb index 44dc1d88..6e9dd65a 100644 --- a/spec/type_aliases/systemd_coredumpsettings_spec.rb +++ b/spec/type_aliases/systemd_coredumpsettings_spec.rb @@ -14,7 +14,7 @@ 'ExternalSizeMax' => '456G', 'JournalSizeMax' => '45T', 'MaxUse' => '1P', - 'MaxFree' => '1E', + 'KeepFree' => '1E', } ) } @@ -28,7 +28,7 @@ 'ExternalSizeMax' => '456', 'JournalSizeMax' => '45', 'MaxUse' => '1', - 'MaxFree' => '5', + 'KeepFree' => '5', } ) } @@ -37,6 +37,7 @@ it { is_expected.not_to allow_value({ 'Compress' => 'maybe' }) } it { is_expected.not_to allow_value({ 'MaxUse' => '-10' }) } it { is_expected.not_to allow_value({ 'MaxFee' => '10Gig' }) } + it { is_expected.not_to allow_value({ 'MaxFree' => '10' }) } it { is_expected.not_to allow_value({ 'ProcessSizeMax' => '20g' }) } it { is_expected.not_to allow_value({ 'JournalSizeMax' => '20Z' }) } end diff --git a/types/coredumpsettings.pp b/types/coredumpsettings.pp index 43dc37ec..15e593fd 100644 --- a/types/coredumpsettings.pp +++ b/types/coredumpsettings.pp @@ -9,6 +9,6 @@ Optional['ExternalSizeMax'] => Pattern[/^[0-9]+(K|M|G|T|P|E)?$/], Optional['JournalSizeMax'] => Pattern[/^[0-9]+(K|M|G|T|P|E)?$/], Optional['MaxUse'] => Pattern[/^[0-9]+(K|M|G|T|P|E)?$/], - Optional['MaxFree'] => Pattern[/^[0-9]+(K|M|G|T|P|E)?$/], + Optional['KeepFree'] => Pattern[/^[0-9]+(K|M|G|T|P|E)?$/], } ]