From 6a1629b0a70e80dd230fc5d363491dd3ab3e0354 Mon Sep 17 00:00:00 2001 From: Eduardo Gonzalez Date: Wed, 19 Apr 2017 10:46:58 +0100 Subject: [PATCH] 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 (cherry picked from commit d14aadd65dc4d3658777ea5c5878197013a82e92) --- docker/cinder/cinder-api/Dockerfile.j2 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docker/cinder/cinder-api/Dockerfile.j2 b/docker/cinder/cinder-api/Dockerfile.j2 index 6c6800fba7..4ce23c0353 100644 --- a/docker/cinder/cinder-api/Dockerfile.j2 +++ b/docker/cinder/cinder-api/Dockerfile.j2 @@ -21,7 +21,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' %} @@ -49,4 +51,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 %}