Merge "set a maximum systemd journal size"
This commit is contained in:
@@ -25,6 +25,9 @@ Beyond installing the ironic-python-agent, this element does the following:
|
||||
listen for raw data from stdin and write compressed data to stdout. Command
|
||||
can be with arguments.
|
||||
* Configures rescue mode if ``DIB_IPA_ENABLE_RESCUE`` is not set to ``false``.
|
||||
* By default, sets a maximum size for the ramdisk systemd journal to 15M. This
|
||||
can be disabled by setting ``DIB_IPA_DISABLE_JOURNAL_MAX_LOG_SIZE`` to any
|
||||
value which is not ``False``.
|
||||
|
||||
This element outputs three files:
|
||||
|
||||
|
||||
15
dib/ironic-python-agent-ramdisk/post-install.d/98-set-journal-config
Executable file
15
dib/ironic-python-agent-ramdisk/post-install.d/98-set-journal-config
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
DIB_IPA_DISABLE_JOURNAL_MAX_LOG_SIZE=${DIB_IPA_DISABLE_JOURNAL_MAX_LOG_SIZE:-False}
|
||||
|
||||
if [[ "$DIB_IPA_DISABLE_JOURNAL_MAX_LOG_SIZE" == "False" ]]; then
|
||||
# Default templates have a journal section already defined, and we don't use
|
||||
# iniset by convention, so unless we really need to, we'll just append here.
|
||||
echo "SystemMaxUse=15M" >> /etc/systemd/journald.conf
|
||||
fi
|
||||
Reference in New Issue
Block a user