Neutron logging to rsyslog

Configure neutron to use rsyslog container as logging mechanism

Change-Id: I7cf8a1327f07c7b9c4405ee65cecd373def0fea9
Implements: bp logging-container
This commit is contained in:
Michal Jastrzebski 2015-09-24 14:02:22 +02:00
parent 9c54b0afff
commit 10776e57f9
3 changed files with 27 additions and 1 deletions

View File

@ -42,6 +42,24 @@ $template HeatAPICfnFile,"/var/log/heat/heat-api-cfn.log"
$template HeatEngineFile,"/var/log/heat/heat-engine.log"
:syslogtag,contains,"heat-engine" ?HeatEngineFile
$template NeutronServerFile,"/var/log/neutron/neutron-server.log"
:syslogtag,contains,"neutron-server" ?NeutronServerFile
$template NeutronOVSAgentFile,"/var/log/neutron/neutron-openvswitch-agent.log"
:syslogtag,contains,"neutron-openvswitch-agent" ?NeutronOVSAgentFile
$template NeutronLinuxbrAgentFile,"/var/log/neutron/neutron-linuxbridge-agent.log"
:syslogtag,contains,"neutron-linuxbridge-agent" ?NeutronLinuxbrAgentFile
$template NeutronDHCPAgentFile,"/var/log/neutron/neutron-dhcp-agent.log"
:syslogtag,contains,"neutron-dhcp-agent" ?NeutronDHCPAgentFile
$template NeutronMetadataAgentFile,"/var/log/neutron/neutron-metadata-agent.log"
:syslogtag,contains,"neutron-metadata-agent" ?NeutronMetadataAgentFile
$template NeutronL3AgentFile,"/var/log/neutron/neutron-l3-agent.log"
:syslogtag,contains,"neutron-l3-agent" ?NeutronL3AgentFile
$template DynFile,"/var/log/syslog.log"
*.* ?DynFile
& ~

View File

@ -64,7 +64,9 @@
insecure_registry: "{{ docker_insecure_registry }}"
name: neutron_server
image: "{{ neutron_server_image_full }}"
volumes: "{{ node_config_directory }}/neutron-server/:/opt/kolla/config_files/:ro"
volumes:
- "{{ node_config_directory }}/neutron-server/:/opt/kolla/config_files/:ro"
- "/var/lib/kolla/dev/log:/dev/log"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['neutron-server']
@ -88,6 +90,7 @@
- "/run:/run"
- "/lib/modules:/lib/modules:ro"
- "{{ node_config_directory }}/neutron-openvswitch-agent/:/opt/kolla/config_files/:ro"
- "/var/lib/kolla/dev/log:/dev/log"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
@ -112,6 +115,7 @@
- "/run:/run"
- "/lib/modules:/lib/modules:ro"
- "{{ node_config_directory }}/neutron-linuxbridge-agent/:/opt/kolla/config_files/:ro"
- "/var/lib/kolla/dev/log:/dev/log"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
NEUTRON_BRIDGE: "br-ex"
@ -137,6 +141,7 @@
volumes:
- "/run:/run"
- "{{ node_config_directory }}/neutron-agents/:/opt/kolla/neutron-agents/:ro"
- "/var/lib/kolla/dev/log:/dev/log"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['neutron-agents']

View File

@ -3,6 +3,9 @@
verbose = true
debug = true
use_syslog = True
syslog_log_facility = LOG_LOCAL0
bind_host = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
bind_port = {{ neutron_server_port }}