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
This commit is contained in:
Michael Davies 2019-09-19 17:47:26 +09:30
parent 9fa39045da
commit c9349c194a
2 changed files with 3 additions and 2 deletions

View File

@ -9,8 +9,8 @@ Listen %PUBLICPORT%
Allow from all
Require all granted
</Directory>
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"
</VirtualHost>

View File

@ -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
}