From f5c9a331e31910ea688725fbcca1b80abe41c5b2 Mon Sep 17 00:00:00 2001 From: Steve Traylen Date: Tue, 5 Dec 2023 12:32:17 +0100 Subject: [PATCH 1/2] 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 --- README.md | 2 +- REFERENCE.md | 2 +- spec/type_aliases/systemd_coredumpsettings_spec.rb | 5 +++-- types/coredumpsettings.pp | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d375e10e..848c2aea 100644 --- a/README.md +++ b/README.md @@ -452,7 +452,7 @@ class{'systemd': 'ExternalSizeMax' => '10G', 'JournalSizeMax' => '20T', 'MaxUse' => '1E', - "MaxFree' => '1P', + "KeepFree' => '1P', } } ``` 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)?$/], } ] From 5c14ffba13958be4ad5837737353e1d44a81ee06 Mon Sep 17 00:00:00 2001 From: Steve Traylen Date: Tue, 5 Dec 2023 20:04:06 +0100 Subject: [PATCH 2/2] typo on quote type --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 848c2aea..34d21c27 100644 --- a/README.md +++ b/README.md @@ -452,7 +452,7 @@ class{'systemd': 'ExternalSizeMax' => '10G', 'JournalSizeMax' => '20T', 'MaxUse' => '1E', - "KeepFree' => '1P', + 'KeepFree' => '1P', } } ```