From 31ff0ec81ff314b17082ed23ab4866e5f0499141 Mon Sep 17 00:00:00 2001 From: Bart Geesink Date: Mon, 9 May 2022 11:21:35 +0200 Subject: [PATCH] Fix systemd error for mongo on docker This fixes an issue when starting mongo on docker. See https://access.redhat.com/solutions/4420581 --- tests/githubactions-build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/githubactions-build.sh b/tests/githubactions-build.sh index 0217b9f12..5b2d76348 100644 --- a/tests/githubactions-build.sh +++ b/tests/githubactions-build.sh @@ -66,7 +66,6 @@ sed -i 's/%target_host%/ansible-test-ga ansible_connection=docker/g' environment # Remove ipv6 listening address in Haproxy sed -i '/haproxy_sni_ip\.ipv6/d' roles/haproxy/templates/haproxy_frontend.cfg.j2 - echo echo "=================================================================" echo "=================================================================" @@ -82,6 +81,11 @@ docker exec ansible-test-ga systemctl stop mysql mongod docker exec ansible-test-ga yum -y remove mongodb-org-mongos mongodb-org-tools docker exec ansible-test-ga rm -rf /var/lib/mongo/journal/* docker exec ansible-test-ga rm -rf /var/lib/mysql/ib_logfile* + +# The latest systemd update breaks mongo on docker (systemd[1]: New main PID 951 does not belong to service, and PID file is not owned by root. Refusing) +# dowgrading it fixes the issue +docker exec ansible-test-ga yum -y downgrade http://vault.centos.org/7.6.1810/updates/x86_64/Packages/systemd-219-62.el7_6.9.x86_64.rpm http://vault.centos.org/7.6.1810/updates/x86_64/Packages/systemd-libs-219-62.el7_6.9.x86_64.rpm http://vault.centos.org/7.6.1810/updates/x86_64/Packages/systemd-sysv-219-62.el7_6.9.x86_64.rpm + docker stop ansible-test-ga ansible-test-ga exit $status