Skip to content
Snippets Groups Projects
Commit 808d6baa authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Change keystone log dir"

parents 2e396fec 493650aa
No related branches found
No related tags found
No related merge requests found
{% set apache_dir = 'apache2' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd' %}
"/var/log/kolla/keystone/*.log"
"/var/log/kolla/{{ apache_dir }}/keystone-apache-*.log"
{
}
{% set apache_dir = 'apache2' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd' %}
[keystone_apache_log_decoder]
type = "SandboxDecoder"
filename = "lua_decoders/os_keystone_apache_log.lua"
......@@ -9,6 +8,6 @@ filename = "lua_decoders/os_keystone_apache_log.lua"
type = "LogstreamerInput"
decoder = "keystone_apache_log_decoder"
log_directory = "/var/log/kolla"
file_match = '{{ apache_dir }}/keystone-apache-(?P<Service>.+)-access\.log\.?(?P<Seq>\d*)$'
file_match = 'keystone/keystone-apache-(?P<Service>.+)-access\.log\.?(?P<Seq>\d*)$'
priority = ["^Seq"]
differentiator = ["keystone-apache-", "Service"]
{% set apache_dir = 'apache2' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd' %}
{% set keystone_log_dir = '/var/log/kolla/keystone' %}
{% set python_path = '/usr/lib/python2.7/site-packages' if kolla_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
Listen {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ keystone_public_port }}
Listen {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ keystone_admin_port }}
......@@ -12,9 +12,9 @@ Listen {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['addr
<IfVersion >= 2.4>
ErrorLogFormat "%{cu}t %M"
</IfVersion>
ErrorLog "/var/log/kolla/{{ apache_dir }}/keystone-apache-public-error.log"
ErrorLog "{{ keystone_log_dir }}/keystone-apache-public-error.log"
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
CustomLog "/var/log/kolla/{{ apache_dir }}/keystone-apache-public-access.log" logformat
CustomLog "{{ keystone_log_dir }}/keystone-apache-public-access.log" logformat
</VirtualHost>
<VirtualHost *:{{ keystone_admin_port }}>
......@@ -26,7 +26,7 @@ Listen {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['addr
<IfVersion >= 2.4>
ErrorLogFormat "%{cu}t %M"
</IfVersion>
ErrorLog "/var/log/kolla/{{ apache_dir }}/keystone-apache-admin-error.log"
ErrorLog "{{ keystone_log_dir }}/keystone-apache-admin-error.log"
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
CustomLog "/var/log/kolla/{{ apache_dir }}/keystone-apache-admin-access.log" logformat
CustomLog "{{ keystone_log_dir }}/keystone-apache-admin-access.log" logformat
</VirtualHost>
......@@ -24,15 +24,6 @@ if [[ $(stat -c %a ${KEYSTONE_LOG_DIR}) != "755" ]]; then
chmod 755 ${KEYSTONE_LOG_DIR}
fi
# Create log dir for Apache logs
APACHE_LOG_DIR="/var/log/kolla/${APACHE_DIR}"
if [[ ! -d "${APACHE_LOG_DIR}" ]]; then
mkdir -p ${APACHE_LOG_DIR}
fi
if [[ $(stat -c %a ${APACHE_LOG_DIR}) != "755" ]]; then
chmod 755 ${APACHE_LOG_DIR}
fi
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment