From 91ce3d9326a4fbd1a4d6bb0f5dce78c694115378 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Mon, 8 Nov 2021 15:19:42 -0500 Subject: [PATCH] Workaround containers.conf log_driver issue Ref: https://github.com/containers/podman/issues/12029 Workaround this by commenting out the log_driver line if it's found to be un-commented. Signed-off-by: Chris Evich --- cache_images/fedora_setup.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cache_images/fedora_setup.sh b/cache_images/fedora_setup.sh index bf2cb5f5..4ce1200d 100644 --- a/cache_images/fedora_setup.sh +++ b/cache_images/fedora_setup.sh @@ -23,6 +23,17 @@ req_env_vars PACKER_BUILD_NAME bash $SCRIPT_DIRPATH/fedora_packaging.sh +# Workaround for issue +# https://github.com/containers/podman/issues/12029 +# where containers.conf has a default 'log_driver = journald' +# which breaks podman's containerized integration testing. +cconf="/usr/share/containers/containers.conf" +note="- commented-out during VM image build" +if grep -Eq '^log_driver.+journald' "$cconf"; then + warn "Patching out $cconf journald log_driver" + $SUDO sed -r -i -e "s/^log_driver(.*)/# log_driver\1 $note/" "$cconf" +fi + if ! ((CONTAINER)); then msg "Enabling cgroup management from containers" ooe.sh $SUDO setsebool -P container_manage_cgroup true