aboutsummaryrefslogtreecommitdiff
path: root/docker/placement/placement-api/extend_start.sh
diff options
context:
space:
mode:
authorEduardo Gonzalez <dabarren@gmail.com>2018-10-26 16:02:21 +0200
committerLee Yarwood <lyarwood@redhat.com>2018-12-19 14:41:20 +0000
commit2f657085c67302ab54dcb64b335a2f3732ba4de4 (patch)
tree4a15dda81596d5a8238ca464d4343ba892aae1eb /docker/placement/placement-api/extend_start.sh
parent772b52572289832de68c75adea458dc88aedfec9 (diff)
downloadkolla-2f657085c67302ab54dcb64b335a2f3732ba4de4.tar.gz
kolla-2f657085c67302ab54dcb64b335a2f3732ba4de4.zip
Split placement-api from nova
This change breaks out the Placement service from Nova ahead of it's removal from the project later in Stein. For the time being the original Nova Placement images are left in place but they will be removed later in the cycle once the Placement code is removed from the Nova project by the following change: https://review.openstack.org/#/c/618215/ Co-Authored-By: Lee Yarwood <lyarwood@redhat.com> Change-Id: I2bf6f5bf45b76e6900f41c21e9af30c69dc6e9c0
Diffstat (limited to 'docker/placement/placement-api/extend_start.sh')
-rw-r--r--docker/placement/placement-api/extend_start.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/docker/placement/placement-api/extend_start.sh b/docker/placement/placement-api/extend_start.sh
new file mode 100644
index 000000000..a8e9635d1
--- /dev/null
+++ b/docker/placement/placement-api/extend_start.sh
@@ -0,0 +1,18 @@
+#!/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
+ placement-manage db sync
+ 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
+ # Loading Apache2 ENV variables
+ . /etc/apache2/envvars
+ rm -rf /var/run/apache2/*
+else
+ rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
+fi