From eb7d1ad198276821c3037cb6a23f995537572dcd Mon Sep 17 00:00:00 2001 From: aojeagarcia Date: Mon, 24 Sep 2018 10:17:16 +0200 Subject: [PATCH] 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 --- tools/fixup_stuff.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/fixup_stuff.sh b/tools/fixup_stuff.sh index 914793245e..a939e30b02 100755 --- a/tools/fixup_stuff.sh +++ b/tools/fixup_stuff.sh @@ -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 }