diff options
Diffstat (limited to 'docker/aodh/aodh-api')
| -rw-r--r-- | docker/aodh/aodh-api/Dockerfile.j2 | 2 | ||||
| -rw-r--r-- | docker/aodh/aodh-api/extend_start.sh | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/docker/aodh/aodh-api/Dockerfile.j2 b/docker/aodh/aodh-api/Dockerfile.j2 index ccb757c5b..275be3aff 100644 --- a/docker/aodh/aodh-api/Dockerfile.j2 +++ b/docker/aodh/aodh-api/Dockerfile.j2 @@ -17,5 +17,3 @@ RUN chmod 755 /usr/local/bin/kolla_aodh_extend_start {% block aodh_api_footer %}{% endblock %} {% block footer %}{% endblock %} {{ include_footer }} - -USER aodh diff --git a/docker/aodh/aodh-api/extend_start.sh b/docker/aodh/aodh-api/extend_start.sh index 65349464c..0826a4645 100644 --- a/docker/aodh/aodh-api/extend_start.sh +++ b/docker/aodh/aodh-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 + . /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 - aodh-manage db_sync + aodh-dbsync exit 0 fi |
