fix(system_baseline): accept every size journald reads for the journal cap
The new check on system_baseline_journal_max_use refused sizes journald accepts (a bare byte count, 1.5G, 10 M, P and E units), which 3.1.0 wrote as given, and accepted infinity, which SystemMaxUse does not take. The check now follows journald's parse_size(): a number with an optional upper-case B, K, M, G, T, P or E, still with no line break. Assisted-by: Claude Code
This commit is contained in:
1 parent
5ac8eadac1
commit
985995656a
5 files changed
+21
-18
No files matched your search
@@ -132,8 +132,8 @@
|
||||
that: "'system_baseline_apt_daily_timeout must be' in ansible_failed_result.msg | default('')"
|
||||
quiet: true
|
||||
|
||||
# The journal cap is a number and a unit letter, or empty: a bare number (journald would read bytes), a zero, a space, a line break, a
|
||||
# lower-case unit and a number that is not a string each stop the run before any change.
|
||||
# The journal cap is a size journald reads, or empty: infinity (SystemMaxUse does not take it), a lower-case unit, a unit with a trailing B,
|
||||
# a line break and a number that is not a string each stop the run before any change.
|
||||
- name: A bad journal size cap is refused
|
||||
hosts: localhost
|
||||
connection: local
|
||||
@@ -145,10 +145,9 @@
|
||||
vars:
|
||||
system_baseline_refused_journal: "{{ item }}"
|
||||
loop:
|
||||
- "300"
|
||||
- "0"
|
||||
- 10 M
|
||||
- infinity
|
||||
- "10m"
|
||||
- "10MB"
|
||||
- "200M\nStorage=none"
|
||||
- 300
|
||||
|
||||
|
||||
Reference in new issue
Block a user