aboutsummaryrefslogtreecommitdiff
path: root/docker/horizon/extend_start.sh
diff options
context:
space:
mode:
Diffstat (limited to 'docker/horizon/extend_start.sh')
-rw-r--r--docker/horizon/extend_start.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/docker/horizon/extend_start.sh b/docker/horizon/extend_start.sh
index a34d33f52..51be17405 100644
--- a/docker/horizon/extend_start.sh
+++ b/docker/horizon/extend_start.sh
@@ -1,5 +1,16 @@
#!/bin/bash
+# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
+# of the KOLLA_BOOTSTRAP variable being set, including empty.
+if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
+ MANAGE_PY="/usr/bin/python /usr/bin/manage.py"
+ if [[ -f "/var/lib/kolla/venv/bin/python" ]]; then
+ MANAGE_PY="/var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py"
+ fi
+ $MANAGE_PY syncdb --noinput
+ exit 0
+fi
+
# 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