From 89f5bfe3acf1303e162953588336bd72ce6ead08 Mon Sep 17 00:00:00 2001 From: Oleh Hryhorov Date: Thu, 30 May 2019 16:04:03 +0300 Subject: [PATCH] Creating directory from ${APACHE_RUN_DIR} variable If an image is built with python3 therefore libapache2-mod-wsgi-py3 module have to be installed accordingly but the module doesn't create /var/run/apache2 directory which is APACHE_RUN_DIR in apache configuration file so apache can't start without it due to the fact that the directory is used to make there pid, run, etc files. Change-Id: Ic92b095e9d7636c3ed833241bd3badbb4bb6e552 --- nova/templates/bin/_nova-placement-api.sh.tpl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nova/templates/bin/_nova-placement-api.sh.tpl b/nova/templates/bin/_nova-placement-api.sh.tpl index 8965fb7635..bc15a37d41 100644 --- a/nova/templates/bin/_nova-placement-api.sh.tpl +++ b/nova/templates/bin/_nova-placement-api.sh.tpl @@ -26,6 +26,11 @@ function start () { if [ -f /etc/apache2/envvars ]; then # Loading Apache2 ENV variables source /etc/apache2/envvars + # The directory below has to be created due to the fact that + # libapache2-mod-wsgi-py3 doesn't create it in contrary by libapache2-mod-wsgi + if [ ! -d ${APACHE_RUN_DIR} ]; then + mkdir -p ${APACHE_RUN_DIR} + fi fi # Start Apache2