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.
This commit is contained in:
Lars Karlitski 2019-05-20 11:52:30 +02:00 committed by Martin Pitt
parent ca171424eb
commit 77acc8972b
1 changed files with 7 additions and 0 deletions

View File

@ -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