Cleanup some legacy code

* Stop setting SElinux as permissive and bring it to 'enforced' again,
  since our blocker is fixed [1].
* Run `apt-get update` only in run_tests.sh script. It's the only place
  we actually need to run it since beaker jobs already manage that task.
* in run_tests.sh, use $SUDO instead of sudo, to be consistent.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1249685

Change-Id: Ic3101a0a080b798b334cd2f212ec726f243880b5
This commit is contained in:
Emilien Macchi 2015-09-29 13:59:17 -04:00
parent 850f2d07dc
commit d1bf79b813
2 changed files with 5 additions and 17 deletions

View File

@ -52,17 +52,3 @@ else
fi fi
puppet module list puppet module list
if type "apt-get" 2>/dev/null; then
# apt-get update needs to be run to be able (later) to install
# ubuntu-cloud-keyring package with puppet
/usr/bin/apt-get update
else
# disable SElinux
# something is python-cffi is preventing Nova & Keystone to
# correctly run when SElinux is enforced. See bug:
# https://bugzilla.redhat.com/show_bug.cgi?id=1249685
# We use || true because if selinux is Disabled the following
# command would fail
/usr/sbin/setenforce 0 || true
fi

View File

@ -19,6 +19,7 @@ if [ $(id -u) != 0 ]; then
fi fi
$SUDO ./install_modules.sh $SUDO ./install_modules.sh
# TODO(pabelanger): Move this into tools/install_tempest.sh and add logic so we # TODO(pabelanger): Move this into tools/install_tempest.sh and add logic so we
# can clone tempest outside of the gate. Also, tempest should be sandboxed into # can clone tempest outside of the gate. Also, tempest should be sandboxed into
# the local directory but works needs to be added into puppet to properly find # the local directory but works needs to be added into puppet to properly find
@ -51,14 +52,15 @@ function uses_debs {
} }
if uses_debs; then if uses_debs; then
sudo apt-get install -y dstat $SUDO apt-get update
$SUDO apt-get install -y dstat
elif is_fedora; then elif is_fedora; then
sudo yum install -y dstat $SUDO yum install -y dstat
fi fi
# use dstat to monitor system activity during integration testing # use dstat to monitor system activity during integration testing
if type "dstat" 2>/dev/null; then if type "dstat" 2>/dev/null; then
$SUDO dstat -tcmndrylpg --top-cpu-adv --top-io-adv --nocolor | sudo tee --append /var/log/dstat.log > /dev/null & $SUDO dstat -tcmndrylpg --top-cpu-adv --top-io-adv --nocolor | $SUDO tee --append /var/log/dstat.log > /dev/null &
fi fi
# Run puppet and assert something changes. # Run puppet and assert something changes.