diff options
| author | Eduardo Gonzalez <dabarren@gmail.com> | 2017-04-19 10:46:58 +0100 |
|---|---|---|
| committer | Eduardo Gonzalez <dabarren@gmail.com> | 2017-04-19 10:46:58 +0100 |
| commit | d14aadd65dc4d3658777ea5c5878197013a82e92 (patch) | |
| tree | 7c1d255f6a89e260f50769d33bdbe0d2c17e06fd /docker | |
| parent | 1cad4813b60dcea08587375e7cfd7b3f8b407592 (diff) | |
| download | kolla-d14aadd65dc4d3658777ea5c5878197013a82e92.tar.gz kolla-d14aadd65dc4d3658777ea5c5878197013a82e92.zip | |
Fix cinder-api ubuntu binary
This changes moves cinder-api to make use of apache to launch
its processes.
Ubuntu binary removed support in Ocata for cinder-api system
services [1].
At this moment cinder in Ocata branch is not working at all
due this issue.
This changes aims to fix cinder in master only for ubuntu binary
with the purpose of make a clean backport to stable/ocata without
do any other change on the backport process.
A follow up change will migrate other OS/install_type to make use of
Apache but only changing master branch.
[1] http://lists.openstack.org/pipermail/openstack-dev/2017-January/111069.html
Change-Id: I86ae3ec899e9b7b1ad9f727b9b9bb3549738f944
Closes-Bug: #1676751
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/cinder/cinder-api/Dockerfile.j2 | 9 | ||||
| -rw-r--r-- | docker/cinder/cinder-api/extend_start.sh | 12 |
2 files changed, 20 insertions, 1 deletions
diff --git a/docker/cinder/cinder-api/Dockerfile.j2 b/docker/cinder/cinder-api/Dockerfile.j2 index bd9cc931e..8121a6b13 100644 --- a/docker/cinder/cinder-api/Dockerfile.j2 +++ b/docker/cinder/cinder-api/Dockerfile.j2 @@ -23,7 +23,9 @@ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ 'libapache2-mod-wsgi' ] %} {{ macros.install_packages(cinder_api_packages | customizable("packages")) }} -RUN echo > /etc/apache2/ports.conf +RUN mkdir -p /var/www/cgi-bin/cinder \ + && cp -a /usr/bin/cinder-wsgi /var/www/cgi-bin/cinder/cinder-wsgi \ + && echo > /etc/apache2/ports.conf {% endif %} {% elif install_type == 'source' %} @@ -53,4 +55,9 @@ RUN chmod 755 /usr/local/bin/kolla_cinder_extend_start {% block cinder_api_footer %}{% endblock %} {% block footer %}{% endblock %} +{% if install_type == 'binary' and base_distro in ['debian', 'ubuntu'] %} +RUN chown -R cinder: /var/www/cgi-bin/cinder \ + && chmod 755 /var/www/cgi-bin/cinder/cinder-wsgi +{% else %} USER cinder +{% endif %} diff --git a/docker/cinder/cinder-api/extend_start.sh b/docker/cinder/cinder-api/extend_start.sh index 176515189..d6709fd59 100644 --- a/docker/cinder/cinder-api/extend_start.sh +++ b/docker/cinder/cinder-api/extend_start.sh @@ -7,3 +7,15 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then cinder-manage db sync exit 0 fi + +if [[ "${KOLLA_INSTALL_TYPE}" == "binary" ]]; then + if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then + # Loading Apache2 ENV variables + . /etc/apache2/envvars + rm -rf /var/run/apache2/* + APACHE_DIR="apache2" + else + rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd* + APACHE_DIR="httpd" + fi +fi |
