set a maximum systemd journal size
We've noticed a trend with deploys where we seem to use up all of the free space in the ramdisk, and this could distinctly be systemd. While we're not logging it, we odn't need infinite logs either because the default pattern is likely to consume quite a bit more space than we would like to use. As such, set a max size. Related-Bug: 2116135 Change-Id: Iae94278640d79232ec66402c799e4bd6e42336df Signed-off-by: Julia Kreger <juliaashleykreger@gmail.com>
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
|
listen for raw data from stdin and write compressed data to stdout. Command
|
||||||
can be with arguments.
|
can be with arguments.
|
||||||
* Configures rescue mode if ``DIB_IPA_ENABLE_RESCUE`` is not set to ``false``.
|
* 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:
|
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