From c9349c194acfa6b759ec82c3141e4f4a126af25e Mon Sep 17 00:00:00 2001 From: Michael Davies Date: Thu, 19 Sep 2019 17:47:26 +0930 Subject: [PATCH] Devstack: Fix iPXE apache log location bug Make the apache log directory configurable, based upon which operating system this is running on. This is needed as ironic devstack is broken on Red Hat-related operating systems as a result. Change-Id: I22e04d886219755a38b1e895c2c6f9d756535cab Story: 2006577 Task: 36689 --- devstack/files/apache-ipxe-ironic.template | 4 ++-- devstack/lib/ironic | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/devstack/files/apache-ipxe-ironic.template b/devstack/files/apache-ipxe-ironic.template index ba182e5828..3be47175c1 100644 --- a/devstack/files/apache-ipxe-ironic.template +++ b/devstack/files/apache-ipxe-ironic.template @@ -9,8 +9,8 @@ Listen %PUBLICPORT% Allow from all Require all granted - ErrorLog /var/log/apache2/ipxe_error.log + ErrorLog %APACHELOGDIR%/ipxe_error.log ErrorLogFormat "%{cu}t [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] [frontend\ %A] %M% ,\ referer\ %{Referer}i" LogLevel info - CustomLog /var/log/apache2/ipxe_access.log "%{%Y-%m-%d}t %{%T}t.%{msec_frac}t [%l] %a \"%r\" %>s %b" + CustomLog %APACHELOGDIR%/ipxe_access.log "%{%Y-%m-%d}t %{%T}t.%{msec_frac}t [%l] %a \"%r\" %>s %b" diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 910be51e56..4df8ee73c6 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -1076,6 +1076,7 @@ function _config_ironic_apache_ipxe { sudo sed -e " s|%PUBLICPORT%|$IRONIC_HTTP_PORT|g; s|%HTTPROOT%|$IRONIC_HTTP_DIR|g; + s|%APACHELOGDIR%|$APACHE_LOG_DIR|g; " -i $ipxe_apache_conf enable_apache_site ipxe-ironic }