Set SELinux to permissive mode for tests

The SELinux policy work for CentOS 7 is not yet done, and it is a
tricky process. The gate jobs ran with Permissive mode a couple of
months ago and gate jobs were more stable.

This patch changes the SELinux mode to Permissive for testing.

Change-Id: I861e20ebd74b3b0df92d5832db76de83a9d63398
This commit is contained in:
Major Hayden 2018-02-20 12:53:40 -06:00
parent 898658336d
commit 35c018a9be
No known key found for this signature in database
GPG Key ID: 737051E0C1011FB1
1 changed files with 8 additions and 0 deletions

View File

@ -93,6 +93,14 @@ else
fi
echo "Current SELinux status: ${SELINUX_STATUS}"
# NOTE(mhayden): SELinux policies for CentOS 7 are still incomplete. Ensure
# SELinux is not in enforcing mode during tests.
if [ "${SELINUX_STATUS}" == "Enforcing" ]; then
echo "NOTE: CentOS 7 SELinux policies are incomplete."
echo "Switching SELinux mode from Enforcing to Permissive."
sudo /usr/sbin/setenforce 0
fi
# Ensure that the Ansible environment is properly prepared
source "${COMMON_TESTS_PATH}/test-ansible-env-prep.sh"