aboutsummaryrefslogtreecommitdiff
path: root/docker/gnocchi/gnocchi-api
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-09-01 15:37:10 +0000
committerGerrit Code Review <review@openstack.org>2016-09-01 15:37:10 +0000
commit10ad5c428944eb11939144b2adbed4bcbba9541b (patch)
treec9b85b7e071afe3560893a49feb82c93400eac98 /docker/gnocchi/gnocchi-api
parent5c5ef797b0e28f5be27d5aeabca5296a87db2458 (diff)
parent55b184a865776be10c039f17bc91038d8ebbdf52 (diff)
downloadkolla-10ad5c428944eb11939144b2adbed4bcbba9541b.tar.gz
kolla-10ad5c428944eb11939144b2adbed4bcbba9541b.zip
Merge "repair gnocchi dockerfile"
Diffstat (limited to 'docker/gnocchi/gnocchi-api')
-rw-r--r--docker/gnocchi/gnocchi-api/Dockerfile.j22
-rw-r--r--docker/gnocchi/gnocchi-api/extend_start.sh12
2 files changed, 11 insertions, 3 deletions
diff --git a/docker/gnocchi/gnocchi-api/Dockerfile.j2 b/docker/gnocchi/gnocchi-api/Dockerfile.j2
index 29482f237..64517108b 100644
--- a/docker/gnocchi/gnocchi-api/Dockerfile.j2
+++ b/docker/gnocchi/gnocchi-api/Dockerfile.j2
@@ -21,5 +21,3 @@ RUN chmod 755 /usr/local/bin/kolla_gnocchi_extend_start
{% block gnocchi_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
-
-USER gnocchi
diff --git a/docker/gnocchi/gnocchi-api/extend_start.sh b/docker/gnocchi/gnocchi-api/extend_start.sh
index aeb3d07d0..ac06893c8 100644
--- a/docker/gnocchi/gnocchi-api/extend_start.sh
+++ b/docker/gnocchi/gnocchi-api/extend_start.sh
@@ -1,8 +1,18 @@
#!/bin/bash
+# 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
+ source /etc/apache2/envvars
+ rm -rf /var/run/apache2/*
+else
+ rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
+fi
+
# 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
- gnocchi-manage db_sync
+ gnocchi-upgrade --logfile /var/log/kolla/gnocchi/gnocchi-upgrade.log
exit 0
fi