diff --git a/ansible/roles/common/templates/rsyslog.conf.j2 b/ansible/roles/common/templates/rsyslog.conf.j2 index 4b6b26a0ce..d040a19339 100755 --- a/ansible/roles/common/templates/rsyslog.conf.j2 +++ b/ansible/roles/common/templates/rsyslog.conf.j2 @@ -15,6 +15,24 @@ $template GlanceApiFile,"/var/log/glance/glance_api.log" $template GlanceRegistryFile,"/var/log/glance/glance_registry.log" :syslogtag,contains,"glance-registry" ?GlanceRegistryFile +$template NovaApiFile,"/var/log/nova/nova-api.log" +:syslogtag,contains,"nova-api" ?NovaApiFile + +$template NovaConductorFile,"/var/log/nova/nova-conductor.log" +:syslogtag,contains,"nova-conductor" ?NovaConductorFile + +$template NovaConsoleauthFile,"/var/log/nova/nova-consoleauth.log" +:syslogtag,contains,"nova-consoleauth" ?NovaConsoleauthFile + +$template NovaNovncFile,"/var/log/nova/nova-novncproxy.log" +:syslogtag,contains,"nova-novncproxy" ?NovaNovncFile + +$template NovaSchedulerFile,"/var/log/nova/nova-scheduler.log" +:syslogtag,contains,"nova-scheduler" ?NovaSchedulerFile + +$template NovaComputeFile,"/var/log/nova/nova-compute.log" +:syslogtag,contains,"nova-compute" ?NovaComputeFile + $template DynFile,"/var/log/syslog.log" *.* ?DynFile & ~ diff --git a/ansible/roles/nova/tasks/start.yml b/ansible/roles/nova/tasks/start.yml index 09501330b0..ee1c032d8f 100644 --- a/ansible/roles/nova/tasks/start.yml +++ b/ansible/roles/nova/tasks/start.yml @@ -41,6 +41,7 @@ name: nova_api image: "{{ nova_api_image_full }}" volumes: + - "/var/lib/kolla/dev/log:/dev/log" - "{{ node_config_directory }}/nova-api/:/opt/kolla/config_files/:ro" - "/lib/modules:/lib/modules:ro" env: @@ -61,7 +62,9 @@ insecure_registry: "{{ docker_insecure_registry }}" name: nova_conductor image: "{{ nova_conductor_image_full }}" - volumes: "{{ node_config_directory }}/nova-conductor/:/opt/kolla/config_files/:ro" + volumes: + - "/var/lib/kolla/dev/log:/dev/log" + - "{{ node_config_directory }}/nova-conductor/:/opt/kolla/config_files/:ro" env: KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" when: inventory_hostname in groups['nova-conductor'] @@ -80,7 +83,9 @@ insecure_registry: "{{ docker_insecure_registry }}" name: nova_consoleauth image: "{{ nova_consoleauth_image_full }}" - volumes: "{{ node_config_directory }}/nova-consoleauth/:/opt/kolla/config_files/:ro" + volumes: + - "/var/lib/kolla/dev/log:/dev/log" + - "{{ node_config_directory }}/nova-consoleauth/:/opt/kolla/config_files/:ro" env: KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" when: inventory_hostname in groups['nova-consoleauth'] @@ -99,7 +104,9 @@ insecure_registry: "{{ docker_insecure_registry }}" name: nova_novncproxy image: "{{ nova_novncproxy_image_full }}" - volumes: "{{ node_config_directory }}/nova-novncproxy/:/opt/kolla/config_files/:ro" + volumes: + - "/var/lib/kolla/dev/log:/dev/log" + - "{{ node_config_directory }}/nova-novncproxy/:/opt/kolla/config_files/:ro" env: KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" when: inventory_hostname in groups['nova-novncproxy'] @@ -118,7 +125,9 @@ insecure_registry: "{{ docker_insecure_registry }}" name: nova_scheduler image: "{{ nova_scheduler_image_full }}" - volumes: "{{ node_config_directory }}/nova-scheduler/:/opt/kolla/config_files/:ro" + volumes: + - "/var/lib/kolla/dev/log:/dev/log" + - "{{ node_config_directory }}/nova-scheduler/:/opt/kolla/config_files/:ro" env: KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" when: inventory_hostname in groups['nova-scheduler'] @@ -142,6 +151,7 @@ - "{{ node_config_directory }}/nova-compute/:/opt/kolla/config_files/:ro" - "/lib/modules:/lib/modules:ro" - "/run:/run" + - "/var/lib/kolla/dev/log:/dev/log" volumes_from: - nova_data env: diff --git a/ansible/roles/nova/templates/nova.conf.j2 b/ansible/roles/nova/templates/nova.conf.j2 index 79f0e0fbb0..d1e7be0cbf 100644 --- a/ansible/roles/nova/templates/nova.conf.j2 +++ b/ansible/roles/nova/templates/nova.conf.j2 @@ -3,6 +3,9 @@ verbose = true debug = true +syslog_log_facility=LOG_LOCAL0 +use_syslog=yes + api_paste_config = /etc/nova/api-paste.ini state_path = /var/lib/nova