Merge "Make Heka collect Magnum logs"
This commit is contained in:
commit
0e67afb73b
@ -6,5 +6,5 @@ filename = "lua_decoders/os_openstack_log.lua"
|
||||
type = "LogstreamerInput"
|
||||
decoder = "openstack_log_decoder"
|
||||
log_directory = "/var/log/kolla"
|
||||
file_match = '(?P<Service>nova|glance|keystone|neutron|cinder|heat|murano)/(?P<Program>.*)\.log'
|
||||
file_match = '(?P<Service>nova|glance|keystone|neutron|cinder|heat|murano|magnum)/(?P<Program>.*)\.log'
|
||||
differentiator = ["Service", "_", "Program"]
|
||||
|
@ -7,12 +7,6 @@ $KLogPermitNonKernelFacility on
|
||||
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
|
||||
$RepeatedMsgReduction on
|
||||
|
||||
$template MagnumApiFile,"/var/log/magnum/magnum-api.log"
|
||||
:syslogtag,contains,"magnum-api" ?MagnumApiFile
|
||||
|
||||
$template MagnumConductorFile,"/var/log/magnum/magnum-conductor.log"
|
||||
:syslogtag,contains,"magnum-conductor" ?MagnumConductorFile
|
||||
|
||||
$template DynFile,"/var/log/syslog.log"
|
||||
*.* {
|
||||
?DynFile
|
||||
|
@ -48,7 +48,9 @@
|
||||
BOOTSTRAP:
|
||||
name: "bootstrap_magnum"
|
||||
restart_policy: "never"
|
||||
volumes: "{{ node_config_directory }}/magnum-api/:{{ container_config_directory }}/:ro"
|
||||
volumes:
|
||||
- "{{ node_config_directory }}/magnum-api/:{{ container_config_directory }}/:ro"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
run_once: True
|
||||
delegate_to: "{{ groups['magnum-api'][0] }}"
|
||||
when: database_created
|
||||
|
@ -7,7 +7,7 @@
|
||||
name: "magnum_api"
|
||||
volumes:
|
||||
- "{{ node_config_directory }}/magnum-api/:{{ container_config_directory }}/:ro"
|
||||
- "rsyslog_socket:/var/lib/kolla/rsyslog/"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
when: inventory_hostname in groups['magnum-api']
|
||||
|
||||
- name: Starting magnum-conductor container
|
||||
@ -18,5 +18,5 @@
|
||||
name: "magnum_conductor"
|
||||
volumes:
|
||||
- "{{ node_config_directory }}/magnum-conductor/:{{ container_config_directory }}/:ro"
|
||||
- "rsyslog_socket:/var/lib/kolla/rsyslog/"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
when: inventory_hostname in groups['magnum-conductor']
|
||||
|
@ -1,8 +1,7 @@
|
||||
[DEFAULT]
|
||||
debug = {{ magnum_logging_debug }}
|
||||
|
||||
use_syslog = true
|
||||
syslog_log_facility = LOG_LOCAL0
|
||||
log_dir = /var/log/kolla/magnum
|
||||
|
||||
{% if service_name == 'magnum-api' %}
|
||||
[api]
|
||||
|
@ -1,5 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ ! -d "/var/log/kolla/magnum" ]]; then
|
||||
mkdir -p /var/log/kolla/magnum
|
||||
fi
|
||||
if [[ $(stat -c %a /var/log/kolla/magnum) != "755" ]]; then
|
||||
chmod 755 /var/log/kolla/magnum
|
||||
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
|
||||
|
@ -15,10 +15,13 @@ ADD magnum-base-archive /magnum-base-source
|
||||
RUN ln -s magnum-base-source/* magnum \
|
||||
&& useradd --user-group magnum \
|
||||
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /magnum \
|
||||
&& mkdir -p /etc/magnum /var/log/magnum /home/magnum \
|
||||
&& mkdir -p /etc/magnum /home/magnum \
|
||||
&& cp -r /magnum/etc/magnum/* /etc/magnum \
|
||||
&& chown -R magnum: /etc/magnum /var/log/magnum /home/magnum
|
||||
&& chown -R magnum: /etc/magnum /home/magnum
|
||||
|
||||
{% endif %}
|
||||
|
||||
RUN usermod -a -G kolla magnum
|
||||
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
||||
|
||||
RUN usermod -a -G kolla magnum \
|
||||
&& chmod 755 /usr/local/bin/kolla_extend_start
|
||||
|
8
docker/magnum/magnum-base/extend_start.sh
Normal file
8
docker/magnum/magnum-base/extend_start.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ ! -d "/var/log/kolla/magnum" ]]; then
|
||||
mkdir -p /var/log/kolla/magnum
|
||||
fi
|
||||
if [[ $(stat -c %a /var/log/kolla/magnum) != "755" ]]; then
|
||||
chmod 755 /var/log/kolla/magnum
|
||||
fi
|
Loading…
Reference in New Issue
Block a user