aboutsummaryrefslogtreecommitdiff
path: root/docker/base
diff options
context:
space:
mode:
authorRadosław Piliszek <radoslaw.piliszek@gmail.com>2020-10-04 11:26:41 +0200
committerRadosław Piliszek <radoslaw.piliszek@gmail.com>2020-10-05 13:03:39 +0200
commit032804e5a0ddf89f7726880d1b57dd492d7d5c07 (patch)
treec85d1b7bb91ddbc9c97095a124b9324403aef178 /docker/base
parent1666ee5b768fee7075e59c2a1409a4bee43e8b5b (diff)
downloadkolla-032804e5a0ddf89f7726880d1b57dd492d7d5c07.tar.gz
kolla-032804e5a0ddf89f7726880d1b57dd492d7d5c07.zip
Be strict about errors in start
Make start.sh run with pipefail and nounset to avoid common errors in the start scripts and detect them early. Httpd code had to be patched to allow it to pass on Debuntu. Also fix the two missed applications of httpd to make sure all its path are covered. And also fix Horizon's ENABLE_ZAQAR - K-A does not use Zaqar. Yet another - Horizon's settings_bundle. :-) Finally, fix Neutron for Debuntu (KOLLA_LEGACY_IPTABLES). Change-Id: I39b8d78f6758df1f92b8b0d2c06ea99b038b843b Depends-On: https://review.opendev.org/711923
Diffstat (limited to 'docker/base')
-rw-r--r--docker/base/httpd_setup.sh3
-rw-r--r--docker/base/start.sh3
2 files changed, 6 insertions, 0 deletions
diff --git a/docker/base/httpd_setup.sh b/docker/base/httpd_setup.sh
index edb1d7df6..fe627652b 100644
--- a/docker/base/httpd_setup.sh
+++ b/docker/base/httpd_setup.sh
@@ -8,6 +8,9 @@ if [[ "$(whoami)" == 'root' ]]; then
# NOTE(pbourke): httpd will not clean up after itself in some cases which
# results in the container not being able to restart. (bug #1489676, 1557036)
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
+ # NOTE(yoctozepto): APACHE_CONFDIR has to be set to pass the next step
+ # under the `set -o nounset` regime
+ APACHE_CONFDIR=
# Loading Apache2 ENV variables
. /etc/apache2/envvars
install -d /var/run/apache2/
diff --git a/docker/base/start.sh b/docker/base/start.sh
index b7ecc22ae..79d7f7c74 100644
--- a/docker/base/start.sh
+++ b/docker/base/start.sh
@@ -1,5 +1,8 @@
#!/bin/bash
+
set -o errexit
+set -o pipefail
+set -o nounset
set -o xtrace
# Processing /var/lib/kolla/config_files/config.json as root. This is necessary