Disable apparmor for openSUSE distros

Dnsmasq and haproxy are used frequently by neutron and nova, apparmor
profiles can block some operations and the deployed cloud can't
work properly so some tests are going to fail.

Some openSUSE distros has apparmor enabled by default so we need to
disable it.

Change-Id: I30fda684effb09810643e58bf0b31a73d7d9b378
Signed-off-by: aojeagarcia <aojeagarcia@suse.com>
This commit is contained in:
aojeagarcia 2018-09-24 10:17:16 +02:00 committed by Antonio Ojea
parent b38cb6d084
commit eb7d1ad198
1 changed files with 14 additions and 0 deletions

View File

@ -205,6 +205,19 @@ function fixup_fedora {
fi
}
function fixup_suse {
if ! is_suse; then
return
fi
# Disable apparmor profiles in openSUSE distros
# to avoid issues with haproxy and dnsmasq
if [ -x /usr/sbin/aa-enabled ] && sudo /usr/sbin/aa-enabled -q; then
sudo systemctl disable apparmor
sudo /usr/sbin/aa-teardown
fi
}
# The version of pip(1.5.4) supported by python-virtualenv(1.11.4) has
# connection issues under proxy so re-install the latest version using
# pip. To avoid having pip's virtualenv overwritten by the distro's
@ -239,5 +252,6 @@ function fixup_all {
fixup_uca
fixup_python_packages
fixup_fedora
fixup_suse
fixup_virtualenv
}