diff --git a/Dockerfile.almalinux-8 b/Dockerfile.almalinux-8 index 001bef7d..66cac82e 100644 --- a/Dockerfile.almalinux-8 +++ b/Dockerfile.almalinux-8 @@ -21,7 +21,6 @@ RUN echo "DefaultLimitNOFILE=1024" >> /etc/systemd/system.conf ENTRYPOINT [ "/usr/sbin/init" ] STOPSIGNAL RTMIN+3 -# test-addon: VOLUME [ "/var/log/journal" ] # test: systemd-container-failed.sh var-lib-nfs-rpc_pipefs.mount # Minimize the systemd setup @@ -36,11 +35,12 @@ RUN systemctl set-default container-ipa.target RUN rmdir -v /etc/systemd/system/multi-user.target.wants \ && mkdir /etc/systemd/system/container-ipa.target.wants \ && ln -s /etc/systemd/system/container-ipa.target.wants /etc/systemd/system/multi-user.target.wants +# podman in systemd mode mounts /var/log/journal volume which creates +# the directory anyway and pollutes podman diff, just pre-create it RUN mkdir /var/log/journal # debug: RUN ! test -f /var/lib/systemd/random-seed RUN systemd-tmpfiles --remove --create # debug: RUN ! test -f /var/lib/systemd/random-seed -# test-addon: VOLUME [ "/var/log/journal" ] # test: systemd-container-diff.sh list-dependencies-rhel-8.out /dev/null docker-diff-minimal-rhel-8.out # Prepare for basic ipa-server-install in container @@ -51,7 +51,6 @@ ADD hostnamectl-wrapper /usr/bin/nisdomainname COPY patches/ipa-rhel-8.patch /root RUN set -o pipefail ; patch --verbose -p0 --fuzz=0 < /root/ipa-rhel-8.patch | tee /dev/stderr | sed -n 's/^patching file //;T;/\.py$/p' | xargs /usr/libexec/platform-python -m compileall -# test-addon: VOLUME [ "/var/log/journal" ] ## # test: systemd-container-ipa-server-install.sh # Move configuration and data to data volume @@ -75,7 +74,7 @@ RUN /usr/local/bin/prepare-volume-template /etc/volume-tmp-list /tmp RUN /usr/local/bin/extract-rpm-upgrade-scriptlets RUN echo 2.0 > /etc/volume-version -VOLUME [ "/tmp", "/run", "/data", "/var/log/journal" ] +VOLUME [ "/tmp", "/run", "/data" ] COPY init-data-minimal /usr/local/sbin/init ENTRYPOINT [ "/usr/local/sbin/init" ] diff --git a/Dockerfile.almalinux-9 b/Dockerfile.almalinux-9 index 86c97320..5c2bdad5 100644 --- a/Dockerfile.almalinux-9 +++ b/Dockerfile.almalinux-9 @@ -24,7 +24,6 @@ RUN echo "DefaultLimitNOFILE=1024" >> /etc/systemd/system.conf ENTRYPOINT [ "/usr/sbin/init" ] STOPSIGNAL RTMIN+3 -# test-addon: VOLUME [ "/var/log/journal" ] # test: systemd-container-failed.sh # Minimize the systemd setup @@ -40,11 +39,13 @@ RUN systemctl set-default container-ipa.target RUN rmdir -v /etc/systemd/system/multi-user.target.wants \ && mkdir /etc/systemd/system/container-ipa.target.wants \ && ln -s /etc/systemd/system/container-ipa.target.wants /etc/systemd/system/multi-user.target.wants +# podman in systemd mode mounts /var/log/journal volume which creates +# the directory anyway and pollutes podman diff, just pre-create it RUN mkdir /var/log/journal # debug: RUN ! test -f /var/lib/systemd/random-seed RUN systemd-tmpfiles --remove --create # debug: RUN ! test -f /var/lib/systemd/random-seed -# test-addon: VOLUME [ "/var/log/journal", "/var/tmp" ] +# test-addon: VOLUME [ "/var/tmp" ] # test: systemd-container-diff.sh list-dependencies-rhel-9.out /dev/null docker-diff-minimal-fedora-23.out # Prepare for basic ipa-server-install in container @@ -55,7 +56,6 @@ ADD hostnamectl-wrapper /usr/bin/nisdomainname COPY patches/ipa-rhel-9.patch /root RUN set -o pipefail ; patch --verbose -p0 --fuzz=0 < /root/ipa-rhel-9.patch | tee /dev/null | sed -n 's/^patching file //;T;/\.py$/p' | xargs /usr/libexec/platform-python -m compileall -# test-addon: VOLUME [ "/var/log/journal" ] ## # test: systemd-container-ipa-server-install.sh # Move configuration and data to data volume @@ -79,7 +79,7 @@ RUN /usr/local/bin/prepare-volume-template /etc/volume-tmp-list /tmp RUN /usr/local/bin/extract-rpm-upgrade-scriptlets RUN echo 2.0 > /etc/volume-version -VOLUME [ "/tmp", "/run", "/data", "/var/log/journal" ] +VOLUME [ "/tmp", "/run", "/data" ] COPY init-data-minimal /usr/local/sbin/init ENTRYPOINT [ "/usr/local/sbin/init" ] diff --git a/Dockerfile.centos-7 b/Dockerfile.centos-7 index c6d4cce9..0fdc8642 100644 --- a/Dockerfile.centos-7 +++ b/Dockerfile.centos-7 @@ -27,7 +27,6 @@ RUN echo "DefaultLimitNOFILE=1024" >> /etc/systemd/system.conf ENTRYPOINT [ "/usr/sbin/init" ] STOPSIGNAL RTMIN+3 -# test-addon: VOLUME [ "/var/log/journal" ] # test: systemd-container-failed.sh network.service sys-fs-fuse-connections.mount var-lib-nfs-rpc_pipefs.mount # Minimize the systemd setup @@ -43,8 +42,8 @@ RUN rmdir -v /etc/systemd/system/multi-user.target.wants \ && ln -s /etc/systemd/system/container-ipa.target.wants /etc/systemd/system/multi-user.target.wants RUN rm /var/lib/systemd/random-seed RUN echo 0123456789abcdef0000000000000000 > /etc/machine-id && systemd-tmpfiles --remove --create && echo -n > /etc/machine-id +# debug: RUN test -d /var/log/journal # debug: RUN ! test -f /var/lib/systemd/random-seed -# test-addon: VOLUME [ "/var/log/journal" ] # test: systemd-container-diff.sh list-dependencies-centos-7.out docker-diff-minimal-centos-7.exceptions docker-diff-minimal-centos-7.out # Prepare for basic ipa-server-install in container @@ -54,7 +53,6 @@ ADD hostnamectl-wrapper /usr/bin/domainname COPY patches/ipa-rhel-7.patch /root RUN set -o pipefail ; patch --verbose -p0 --fuzz=0 < /root/ipa-rhel-7.patch | tee /dev/stderr | sed -n 's/^patching file //;T;/\.py$/p' | xargs python -m compileall -# test-addon: VOLUME [ "/var/log/journal" ] ## # test: systemd-container-ipa-server-install.sh # Move configuration and data to data volume @@ -71,7 +69,7 @@ RUN /usr/local/bin/prepare-volume-template /etc/volume-tmp-list /tmp RUN /usr/local/bin/extract-rpm-upgrade-scriptlets RUN echo 2.0 > /etc/volume-version -VOLUME [ "/tmp", "/run", "/data", "/var/log/journal" ] +VOLUME [ "/tmp", "/run", "/data" ] COPY init-data-minimal /usr/local/sbin/init ENTRYPOINT [ "/usr/local/sbin/init" ] diff --git a/Dockerfile.centos-8-stream b/Dockerfile.centos-8-stream index d1c2ee3c..57c6fe25 100644 --- a/Dockerfile.centos-8-stream +++ b/Dockerfile.centos-8-stream @@ -21,7 +21,6 @@ RUN echo "DefaultLimitNOFILE=1024" >> /etc/systemd/system.conf ENTRYPOINT [ "/usr/sbin/init" ] STOPSIGNAL RTMIN+3 -# test-addon: VOLUME [ "/var/log/journal" ] # test: systemd-container-failed.sh systemd-hostnamed.service var-lib-nfs-rpc_pipefs.mount # Minimize the systemd setup @@ -36,11 +35,12 @@ RUN systemctl set-default container-ipa.target RUN rmdir -v /etc/systemd/system/multi-user.target.wants \ && mkdir /etc/systemd/system/container-ipa.target.wants \ && ln -s /etc/systemd/system/container-ipa.target.wants /etc/systemd/system/multi-user.target.wants +# podman in systemd mode mounts /var/log/journal volume which creates +# the directory anyway and pollutes podman diff, just pre-create it RUN mkdir /var/log/journal # debug: RUN ! test -f /var/lib/systemd/random-seed RUN systemd-tmpfiles --remove --create # debug: RUN ! test -f /var/lib/systemd/random-seed -# test-addon: VOLUME [ "/var/log/journal" ] # test: systemd-container-diff.sh list-dependencies-rhel-8.out /dev/null docker-diff-minimal-rhel-8.out # Prepare for basic ipa-server-install in container @@ -51,7 +51,6 @@ ADD hostnamectl-wrapper /usr/bin/nisdomainname COPY patches/ipa-rhel-8.patch /root RUN set -o pipefail ; patch --verbose -p0 --fuzz=0 < /root/ipa-rhel-8.patch | tee /dev/stderr | sed -n 's/^patching file //;T;/\.py$/p' | xargs /usr/libexec/platform-python -m compileall -# test-addon: VOLUME [ "/var/log/journal" ] ## # test: systemd-container-ipa-server-install.sh # Move configuration and data to data volume @@ -75,7 +74,7 @@ RUN /usr/local/bin/prepare-volume-template /etc/volume-tmp-list /tmp RUN /usr/local/bin/extract-rpm-upgrade-scriptlets RUN echo 2.0 > /etc/volume-version -VOLUME [ "/tmp", "/run", "/data", "/var/log/journal" ] +VOLUME [ "/tmp", "/run", "/data" ] COPY init-data-minimal /usr/local/sbin/init ENTRYPOINT [ "/usr/local/sbin/init" ] diff --git a/Dockerfile.centos-9-stream b/Dockerfile.centos-9-stream index a142e170..de9eb694 100644 --- a/Dockerfile.centos-9-stream +++ b/Dockerfile.centos-9-stream @@ -24,7 +24,6 @@ RUN echo "DefaultLimitNOFILE=1024" >> /etc/systemd/system.conf ENTRYPOINT [ "/usr/sbin/init" ] STOPSIGNAL RTMIN+3 -# test-addon: VOLUME [ "/var/log/journal" ] # test: systemd-container-failed.sh # Minimize the systemd setup @@ -40,11 +39,13 @@ RUN systemctl set-default container-ipa.target RUN rmdir -v /etc/systemd/system/multi-user.target.wants \ && mkdir /etc/systemd/system/container-ipa.target.wants \ && ln -s /etc/systemd/system/container-ipa.target.wants /etc/systemd/system/multi-user.target.wants +# podman in systemd mode mounts /var/log/journal volume which creates +# the directory anyway and pollutes podman diff, just pre-create it RUN mkdir /var/log/journal # debug: RUN ! test -f /var/lib/systemd/random-seed RUN systemd-tmpfiles --remove --create # debug: RUN ! test -f /var/lib/systemd/random-seed -# test-addon: VOLUME [ "/var/log/journal", "/var/tmp" ] +# test-addon: VOLUME [ "/var/tmp" ] # test: systemd-container-diff.sh list-dependencies-rhel-9.out /dev/null docker-diff-minimal-fedora-23.out # Prepare for basic ipa-server-install in container @@ -55,7 +56,6 @@ ADD hostnamectl-wrapper /usr/bin/nisdomainname COPY patches/ipa-rhel-9.patch /root RUN set -o pipefail ; patch --verbose -p0 --fuzz=0 < /root/ipa-rhel-9.patch | tee /dev/null | sed -n 's/^patching file //;T;/\.py$/p' | xargs /usr/libexec/platform-python -m compileall -# test-addon: VOLUME [ "/var/log/journal" ] ## # test: systemd-container-ipa-server-install.sh # Move configuration and data to data volume @@ -79,7 +79,7 @@ RUN /usr/local/bin/prepare-volume-template /etc/volume-tmp-list /tmp RUN /usr/local/bin/extract-rpm-upgrade-scriptlets RUN echo 2.0 > /etc/volume-version -VOLUME [ "/tmp", "/run", "/data", "/var/log/journal" ] +VOLUME [ "/tmp", "/run", "/data" ] COPY init-data-minimal /usr/local/sbin/init ENTRYPOINT [ "/usr/local/sbin/init" ] diff --git a/Dockerfile.fedora-38 b/Dockerfile.fedora-38 index b7745e2f..3dbfffda 100644 --- a/Dockerfile.fedora-38 +++ b/Dockerfile.fedora-38 @@ -25,7 +25,6 @@ RUN echo "DefaultLimitNOFILE=1024" >> /etc/systemd/system.conf ENTRYPOINT [ "/usr/sbin/init" ] STOPSIGNAL RTMIN+3 -# test-addon: VOLUME [ "/var/log/journal" ] # test: systemd-container-failed.sh # Minimize the systemd setup @@ -43,9 +42,9 @@ RUN rmdir -v /etc/systemd/system/multi-user.target.wants \ && ln -s /etc/systemd/system/container-ipa.target.wants /etc/systemd/system/multi-user.target.wants RUN systemd-sysusers RUN systemd-tmpfiles --remove --create -RUN mkdir -p /var/log/journal +# debug: RUN test -d /var/log/journal # debug: RUN ! test -f /var/lib/systemd/random-seed -# test-addon: VOLUME [ "/var/log/journal", "/var/tmp", "/var/lib/tpm2-tss/system/keystore" ] +# test-addon: VOLUME [ "/var/tmp", "/var/lib/tpm2-tss/system/keystore" ] # test: systemd-container-diff.sh list-dependencies-fedora-38.out /dev/null docker-diff-minimal-fedora-23.out # Prepare for basic ipa-server-install in container @@ -53,7 +52,6 @@ RUN mkdir -p /var/log/journal RUN mv /usr/bin/nisdomainname /usr/bin/nisdomainname.orig ADD hostnamectl-wrapper /usr/bin/nisdomainname -# test-addon: VOLUME [ "/var/log/journal" ] ## # test: systemd-container-ipa-server-install.sh # Move configuration and data to data volume @@ -73,7 +71,7 @@ RUN /usr/local/bin/prepare-volume-template /etc/volume-tmp-list /tmp RUN /usr/local/bin/extract-rpm-upgrade-scriptlets RUN echo 2.0 > /etc/volume-version -VOLUME [ "/tmp", "/run", "/data", "/var/log/journal" ] +VOLUME [ "/tmp", "/run", "/data" ] COPY init-data-minimal /usr/local/sbin/init ENTRYPOINT [ "/usr/local/sbin/init" ] diff --git a/Dockerfile.fedora-39 b/Dockerfile.fedora-39 index 41648c61..ef4e7e4d 100644 --- a/Dockerfile.fedora-39 +++ b/Dockerfile.fedora-39 @@ -25,7 +25,6 @@ RUN echo "DefaultLimitNOFILE=1024" >> /etc/systemd/system.conf ENTRYPOINT [ "/usr/sbin/init" ] STOPSIGNAL RTMIN+3 -# test-addon: VOLUME [ "/var/log/journal" ] # test: systemd-container-failed.sh # Minimize the systemd setup @@ -43,9 +42,9 @@ RUN rmdir -v /etc/systemd/system/multi-user.target.wants \ && ln -s /etc/systemd/system/container-ipa.target.wants /etc/systemd/system/multi-user.target.wants RUN systemd-sysusers RUN systemd-tmpfiles --remove --create -RUN mkdir -p /var/log/journal +# debug: RUN test -d /var/log/journal # debug: RUN ! test -f /var/lib/systemd/random-seed -# test-addon: VOLUME [ "/var/log/journal", "/var/tmp" ] +# test-addon: VOLUME [ "/var/tmp" ] # test: systemd-container-diff.sh list-dependencies-fedora-38.out /dev/null docker-diff-minimal-fedora-23.out # Prepare for basic ipa-server-install in container @@ -53,7 +52,6 @@ RUN mkdir -p /var/log/journal RUN mv /usr/bin/nisdomainname /usr/bin/nisdomainname.orig ADD hostnamectl-wrapper /usr/bin/nisdomainname -# test-addon: VOLUME [ "/var/log/journal" ] ## # test: systemd-container-ipa-server-install.sh # Move configuration and data to data volume @@ -73,7 +71,7 @@ RUN /usr/local/bin/prepare-volume-template /etc/volume-tmp-list /tmp RUN /usr/local/bin/extract-rpm-upgrade-scriptlets RUN echo 2.0 > /etc/volume-version -VOLUME [ "/tmp", "/run", "/data", "/var/log/journal" ] +VOLUME [ "/tmp", "/run", "/data" ] COPY init-data-minimal /usr/local/sbin/init ENTRYPOINT [ "/usr/local/sbin/init" ] diff --git a/Dockerfile.fedora-rawhide b/Dockerfile.fedora-rawhide index 7e1958a0..c742753d 100644 --- a/Dockerfile.fedora-rawhide +++ b/Dockerfile.fedora-rawhide @@ -26,7 +26,6 @@ RUN echo "DefaultLimitNOFILE=1024" >> /etc/systemd/system.conf ENTRYPOINT [ "/usr/sbin/init" ] STOPSIGNAL RTMIN+3 -# test-addon: VOLUME [ "/var/log/journal" ] # test: systemd-container-failed.sh # Minimize the systemd setup @@ -44,9 +43,9 @@ RUN rmdir -v /etc/systemd/system/multi-user.target.wants \ && ln -s /etc/systemd/system/container-ipa.target.wants /etc/systemd/system/multi-user.target.wants RUN systemd-sysusers RUN systemd-tmpfiles --remove --create -RUN mkdir -p /var/log/journal +# debug: RUN test -d /var/log/journal # debug: RUN ! test -f /var/lib/systemd/random-seed -# test-addon: VOLUME [ "/var/log/journal", "/var/tmp" ] +# test-addon: VOLUME [ "/var/tmp" ] # test: systemd-container-diff.sh list-dependencies-fedora-38.out /dev/null docker-diff-minimal-fedora-23.out # Prepare for basic ipa-server-install in container @@ -54,7 +53,6 @@ RUN mkdir -p /var/log/journal RUN mv /usr/bin/nisdomainname /usr/bin/nisdomainname.orig ADD hostnamectl-wrapper /usr/bin/nisdomainname -# test-addon: VOLUME [ "/var/log/journal" ] ## # test: systemd-container-ipa-server-install.sh # Move configuration and data to data volume @@ -74,7 +72,7 @@ RUN /usr/local/bin/prepare-volume-template /etc/volume-tmp-list /tmp RUN /usr/local/bin/extract-rpm-upgrade-scriptlets RUN echo 2.0 > /etc/volume-version -VOLUME [ "/tmp", "/run", "/data", "/var/log/journal" ] +VOLUME [ "/tmp", "/run", "/data" ] COPY init-data-minimal /usr/local/sbin/init ENTRYPOINT [ "/usr/local/sbin/init" ] diff --git a/Dockerfile.rhel-7 b/Dockerfile.rhel-7 index abf00227..8ee4b8eb 100644 --- a/Dockerfile.rhel-7 +++ b/Dockerfile.rhel-7 @@ -22,7 +22,6 @@ RUN echo "DefaultLimitNOFILE=1024" >> /etc/systemd/system.conf ENTRYPOINT [ "/usr/sbin/init" ] STOPSIGNAL RTMIN+3 -# test-addon: VOLUME [ "/var/log/journal" ] # test: systemd-container-failed.sh network.service sys-fs-fuse-connections.mount var-lib-nfs-rpc_pipefs.mount # Minimize the systemd setup @@ -38,8 +37,8 @@ RUN rmdir -v /etc/systemd/system/multi-user.target.wants \ && ln -s /etc/systemd/system/container-ipa.target.wants /etc/systemd/system/multi-user.target.wants RUN rm /var/lib/systemd/random-seed RUN echo 0123456789abcdef0000000000000000 > /etc/machine-id && systemd-tmpfiles --remove --create && echo -n > /etc/machine-id +# debug: RUN test -d /var/log/journal # debug: RUN ! test -f /var/lib/systemd/random-seed -# test-addon: VOLUME [ "/var/log/journal" ] # test: systemd-container-diff.sh list-dependencies-centos-7.out docker-diff-minimal-centos-7.exceptions docker-diff-minimal-centos-7.out # Prepare for basic ipa-server-install in container @@ -49,7 +48,6 @@ ADD hostnamectl-wrapper /usr/bin/domainname COPY patches/ipa-rhel-7.patch /root RUN set -o pipefail ; patch --verbose -p0 --fuzz=0 < /root/ipa-rhel-7.patch | tee /dev/stderr | sed -n 's/^patching file //;T;/\.py$/p' | xargs python -m compileall -# test-addon: VOLUME [ "/var/log/journal" ] ## # test: systemd-container-ipa-server-install.sh # Move configuration and data to data volume @@ -66,7 +64,7 @@ RUN /usr/local/bin/prepare-volume-template /etc/volume-tmp-list /tmp RUN /usr/local/bin/extract-rpm-upgrade-scriptlets RUN echo 2.0 > /etc/volume-version -VOLUME [ "/tmp", "/run", "/data", "/var/log/journal" ] +VOLUME [ "/tmp", "/run", "/data" ] COPY init-data-minimal /usr/local/sbin/init ENTRYPOINT [ "/usr/local/sbin/init" ] diff --git a/Dockerfile.rhel-8 b/Dockerfile.rhel-8 index b0868871..2627075e 100644 --- a/Dockerfile.rhel-8 +++ b/Dockerfile.rhel-8 @@ -20,7 +20,6 @@ RUN echo "DefaultLimitNOFILE=1024" >> /etc/systemd/system.conf ENTRYPOINT [ "/usr/sbin/init" ] STOPSIGNAL RTMIN+3 -# test-addon: VOLUME [ "/var/log/journal" ] # test: systemd-container-failed.sh var-lib-nfs-rpc_pipefs.mount # Minimize the systemd setup @@ -34,10 +33,11 @@ RUN systemctl set-default container-ipa.target RUN rmdir -v /etc/systemd/system/multi-user.target.wants \ && mkdir /etc/systemd/system/container-ipa.target.wants \ && ln -s /etc/systemd/system/container-ipa.target.wants /etc/systemd/system/multi-user.target.wants +# podman in systemd mode mounts /var/log/journal volume which creates +# the directory anyway and pollutes podman diff, just pre-create it RUN mkdir /var/log/journal RUN systemd-tmpfiles --remove --create # debug: RUN ! test -f /var/lib/systemd/random-seed -# test-addon: VOLUME [ "/var/log/journal" ] # test: systemd-container-diff.sh list-dependencies-rhel-8.out /dev/null docker-diff-minimal-rhel-8.out # Prepare for basic ipa-server-install in container @@ -48,7 +48,6 @@ ADD hostnamectl-wrapper /usr/bin/nisdomainname COPY patches/ipa-rhel-8.patch /root RUN set -o pipefail ; patch --verbose -p0 --fuzz=0 < /root/ipa-rhel-8.patch | tee /dev/stderr | sed -n 's/^patching file //;T;/\.py$/p' | xargs /usr/libexec/platform-python -m compileall -# test-addon: VOLUME [ "/var/log/journal" ] ## # test: systemd-container-ipa-server-install.sh # Move configuration and data to data volume @@ -72,7 +71,7 @@ RUN /usr/local/bin/prepare-volume-template /etc/volume-tmp-list /tmp RUN /usr/local/bin/extract-rpm-upgrade-scriptlets RUN echo 2.0 > /etc/volume-version -VOLUME [ "/tmp", "/run", "/data", "/var/log/journal" ] +VOLUME [ "/tmp", "/run", "/data" ] COPY init-data-minimal /usr/local/sbin/init ENTRYPOINT [ "/usr/local/sbin/init" ] diff --git a/Dockerfile.rhel-9 b/Dockerfile.rhel-9 index b72b89ef..c1492713 100644 --- a/Dockerfile.rhel-9 +++ b/Dockerfile.rhel-9 @@ -23,7 +23,6 @@ RUN echo "DefaultLimitNOFILE=1024" >> /etc/systemd/system.conf ENTRYPOINT [ "/usr/sbin/init" ] STOPSIGNAL RTMIN+3 -# test-addon: VOLUME [ "/var/log/journal" ] # test: systemd-container-failed.sh # Minimize the systemd setup @@ -39,11 +38,13 @@ RUN systemctl set-default container-ipa.target RUN rmdir -v /etc/systemd/system/multi-user.target.wants \ && mkdir /etc/systemd/system/container-ipa.target.wants \ && ln -s /etc/systemd/system/container-ipa.target.wants /etc/systemd/system/multi-user.target.wants +# podman in systemd mode mounts /var/log/journal volume which creates +# the directory anyway and pollutes podman diff, just pre-create it RUN mkdir /var/log/journal # debug: RUN ! test -f /var/lib/systemd/random-seed RUN systemd-tmpfiles --remove --create # debug: RUN ! test -f /var/lib/systemd/random-seed -# test-addon: VOLUME [ "/var/log/journal", "/var/tmp" ] +# test-addon: VOLUME [ "/var/tmp" ] # test: systemd-container-diff.sh list-dependencies-rhel-9.out /dev/null docker-diff-minimal-fedora-23.out # Prepare for basic ipa-server-install in container @@ -54,7 +55,6 @@ ADD hostnamectl-wrapper /usr/bin/nisdomainname COPY patches/ipa-rhel-9.patch /root RUN set -o pipefail ; patch --verbose -p0 --fuzz=0 < /root/ipa-rhel-9.patch | tee /dev/null | sed -n 's/^patching file //;T;/\.py$/p' | xargs /usr/libexec/platform-python -m compileall -# test-addon: VOLUME [ "/var/log/journal" ] ## # test: systemd-container-ipa-server-install.sh # Move configuration and data to data volume @@ -78,7 +78,7 @@ RUN /usr/local/bin/prepare-volume-template /etc/volume-tmp-list /tmp RUN /usr/local/bin/extract-rpm-upgrade-scriptlets RUN echo 2.0 > /etc/volume-version -VOLUME [ "/tmp", "/run", "/data", "/var/log/journal" ] +VOLUME [ "/tmp", "/run", "/data" ] COPY init-data-minimal /usr/local/sbin/init ENTRYPOINT [ "/usr/local/sbin/init" ] diff --git a/Dockerfile.rocky-8 b/Dockerfile.rocky-8 index d3a15075..4f4cdad1 100644 --- a/Dockerfile.rocky-8 +++ b/Dockerfile.rocky-8 @@ -21,7 +21,6 @@ RUN echo "DefaultLimitNOFILE=1024" >> /etc/systemd/system.conf ENTRYPOINT [ "/usr/sbin/init" ] STOPSIGNAL RTMIN+3 -# test-addon: VOLUME [ "/var/log/journal" ] # test: systemd-container-failed.sh var-lib-nfs-rpc_pipefs.mount # Minimize the systemd setup @@ -36,11 +35,12 @@ RUN systemctl set-default container-ipa.target RUN rmdir -v /etc/systemd/system/multi-user.target.wants \ && mkdir /etc/systemd/system/container-ipa.target.wants \ && ln -s /etc/systemd/system/container-ipa.target.wants /etc/systemd/system/multi-user.target.wants +# podman in systemd mode mounts /var/log/journal volume which creates +# the directory anyway and pollutes podman diff, just pre-create it RUN mkdir /var/log/journal # debug: RUN ! test -f /var/lib/systemd/random-seed RUN systemd-tmpfiles --remove --create # debug: RUN ! test -f /var/lib/systemd/random-seed -# test-addon: VOLUME [ "/var/log/journal" ] # test: systemd-container-diff.sh list-dependencies-rhel-8.out /dev/null docker-diff-minimal-rhel-8.out # Prepare for basic ipa-server-install in container @@ -51,7 +51,6 @@ ADD hostnamectl-wrapper /usr/bin/nisdomainname COPY patches/ipa-rhel-8.patch /root RUN set -o pipefail ; patch --verbose -p0 --fuzz=0 < /root/ipa-rhel-8.patch | tee /dev/stderr | sed -n 's/^patching file //;T;/\.py$/p' | xargs /usr/libexec/platform-python -m compileall -# test-addon: VOLUME [ "/var/log/journal" ] ## # test: systemd-container-ipa-server-install.sh # Move configuration and data to data volume @@ -75,7 +74,7 @@ RUN /usr/local/bin/prepare-volume-template /etc/volume-tmp-list /tmp RUN /usr/local/bin/extract-rpm-upgrade-scriptlets RUN echo 2.0 > /etc/volume-version -VOLUME [ "/tmp", "/run", "/data", "/var/log/journal" ] +VOLUME [ "/tmp", "/run", "/data" ] COPY init-data-minimal /usr/local/sbin/init ENTRYPOINT [ "/usr/local/sbin/init" ] diff --git a/Dockerfile.rocky-9 b/Dockerfile.rocky-9 index 66878bd5..4caf686a 100644 --- a/Dockerfile.rocky-9 +++ b/Dockerfile.rocky-9 @@ -24,7 +24,6 @@ RUN echo "DefaultLimitNOFILE=1024" >> /etc/systemd/system.conf ENTRYPOINT [ "/usr/sbin/init" ] STOPSIGNAL RTMIN+3 -# test-addon: VOLUME [ "/var/log/journal" ] # test: systemd-container-failed.sh # Minimize the systemd setup @@ -40,11 +39,13 @@ RUN systemctl set-default container-ipa.target RUN rmdir -v /etc/systemd/system/multi-user.target.wants \ && mkdir /etc/systemd/system/container-ipa.target.wants \ && ln -s /etc/systemd/system/container-ipa.target.wants /etc/systemd/system/multi-user.target.wants +# podman in systemd mode mounts /var/log/journal volume which creates +# the directory anyway and pollutes podman diff, just pre-create it RUN mkdir /var/log/journal # debug: RUN ! test -f /var/lib/systemd/random-seed RUN systemd-tmpfiles --remove --create # debug: RUN ! test -f /var/lib/systemd/random-seed -# test-addon: VOLUME [ "/var/log/journal", "/var/tmp" ] +# test-addon: VOLUME [ "/var/tmp" ] # test: systemd-container-diff.sh list-dependencies-rhel-9.out /dev/null docker-diff-minimal-fedora-23.out # Prepare for basic ipa-server-install in container @@ -55,7 +56,6 @@ ADD hostnamectl-wrapper /usr/bin/nisdomainname COPY patches/ipa-rhel-9.patch /root RUN set -o pipefail ; patch --verbose -p0 --fuzz=0 < /root/ipa-rhel-9.patch | tee /dev/null | sed -n 's/^patching file //;T;/\.py$/p' | xargs /usr/libexec/platform-python -m compileall -# test-addon: VOLUME [ "/var/log/journal" ] ## # test: systemd-container-ipa-server-install.sh # Move configuration and data to data volume @@ -79,7 +79,7 @@ RUN /usr/local/bin/prepare-volume-template /etc/volume-tmp-list /tmp RUN /usr/local/bin/extract-rpm-upgrade-scriptlets RUN echo 2.0 > /etc/volume-version -VOLUME [ "/tmp", "/run", "/data", "/var/log/journal" ] +VOLUME [ "/tmp", "/run", "/data" ] COPY init-data-minimal /usr/local/sbin/init ENTRYPOINT [ "/usr/local/sbin/init" ] diff --git a/tests/systemd-container-diff.sh b/tests/systemd-container-diff.sh index 688c5983..c5f89d6c 100755 --- a/tests/systemd-container-diff.sh +++ b/tests/systemd-container-diff.sh @@ -18,8 +18,9 @@ done $docker exec $C systemctl is-system-running --no-pager -l $docker exec $C systemctl list-dependencies -a --no-pager -l | grep -v '\.slice' | tee /dev/stderr | diff tests/$L /dev/stdin MACHINE_ID=$( $docker exec $C cat /etc/machine-id ) -$docker exec $C ls -la /var/log/journal/$MACHINE_ID/system.journal || $docker exec $C ls -la /run/log/journal/$MACHINE_ID/system.journal -! ls -la /var/log/journal/$MACHINE_ID/system.journal +! $docker exec $C ls -la /var/log/journal/$MACHINE_ID +$docker exec $C ls -la /run/log/journal/$MACHINE_ID/system.journal +! ls -la /var/log/journal/$MACHINE_ID $docker diff $C | tee /dev/stderr | grep -v '^C /etc$' | ( cd tests && grep -Evf $E ) | sort | diff tests/$D /dev/stdin diff --git a/tests/systemd-container-ipa-server-install.sh b/tests/systemd-container-ipa-server-install.sh index 525687b8..717e76b7 100755 --- a/tests/systemd-container-ipa-server-install.sh +++ b/tests/systemd-container-ipa-server-install.sh @@ -24,11 +24,8 @@ if $EXIT ; then fi $docker exec $C ls -la /var/log/ipaserver-install.log MACHINE_ID=$( $docker exec $C cat /etc/machine-id ) -if $docker exec $C test -d /data ; then - $docker exec $C ls -la /var/log/journal/$MACHINE_ID/system.journal -else - $docker exec $C ls -la /run/log/journal/$MACHINE_ID/system.journal -fi +! $docker exec $C ls -la /var/log/journal/$MACHINE_ID +$docker exec $C ls -la /run/log/journal/$MACHINE_ID/system.journal echo OK $0.