From 77acc8972b0b0491118ec3d132d89201c589ba46 Mon Sep 17 00:00:00 2001 From: Lars Karlitski Date: Mon, 20 May 2019 11:52:30 +0200 Subject: [PATCH] test_compose_tar: Work around selinux policy change A compose can change the hosts' policy, which can lead to docker crashing if the container-selinux policy is not included. Add a workaround and bug link. --- tests/cli/test_compose_tar.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/cli/test_compose_tar.sh b/tests/cli/test_compose_tar.sh index c0439ebd..8ff077df 100755 --- a/tests/cli/test_compose_tar.sh +++ b/tests/cli/test_compose_tar.sh @@ -31,6 +31,13 @@ rlJournalStart rlFail "Compose UUID is empty!" fi + # Running a compose can lead to a different selinux policy in the + # kernel, which may break docker. Reload the policy from the host and + # restart docker as a workaround. + # See https://bugzilla.redhat.com/show_bug.cgi?id=1711813 + semodule -R + systemctl restart docker + rlRun -t -c "$CLI compose image $UUID" IMAGE="$UUID-root.tar.xz" rlPhaseEnd