From 56838a347e36677199e10fc376642cffdf82b141 Mon Sep 17 00:00:00 2001 From: zhubingbing <1392607554@qq.com> Date: Wed, 3 Aug 2016 17:50:44 +0000 Subject: repair aodh image dockerfile 1. Add the missing packages in the aodh image packages: pymongo 2. Add aodh sudoer 3. aodh sync db command is error sync db command is: aodh-dbsync Reference link: http://docs.openstack.org/developer/aodh/install/manual.html 4. Add aodh-api running as a mod_wsgi Reference link: http://docs.openstack.org/developer/aodh/install/mod_wsgi.html Closes-Bug: #1609000 Change-Id: Ia3706794059231fa08444e32eb034d64fbfa5182 --- docker/aodh/aodh-api/Dockerfile.j2 | 2 -- docker/aodh/aodh-api/extend_start.sh | 12 +++++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'docker/aodh/aodh-api') 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 -- cgit v1.2.3