diff --git a/ansible/roles/common/templates/rsyslog.conf.j2 b/ansible/roles/common/templates/rsyslog.conf.j2 index 2108f6467f..a789bff243 100755 --- a/ansible/roles/common/templates/rsyslog.conf.j2 +++ b/ansible/roles/common/templates/rsyslog.conf.j2 @@ -78,6 +78,54 @@ $template CinderSchedulerFile,"/var/log/cinder/cinder-scheduler.log" $template CinderVolumeFile,"/var/log/cinder/cinder-volume.log" :syslogtag,contains,"cinder-volume" ?CinderVolumeFile +$template SwiftAccountFile,"/var/log/swift/swift-account-server.log" +:syslogtag,contains,"swift-account-server" ?SwiftAccountFile + +$template SwiftAccountAuditorFile,"/var/log/swift/swift-account-auditor.log" +:syslogtag,contains,"swift-account-auditor" ?SwiftAccountAuditorFile + +$template SwiftAccountServerFile,"/var/log/swift/swift-account-server.log" +:syslogtag,contains,"swift-account-server" ?SwiftAccountServerFile + +$template SwiftContainerReplicatorFile,"/var/log/swift/swift-container-replicator.log" +:syslogtag,contains,"swift-container-replicator" ?SwiftContainerReplicatorFile + +$template SwiftObjectAuditorFile,"/var/log/swift/swift-object-auditor.log" +:syslogtag,contains,"swift-object-auditor" ?SwiftObjectAuditorFile + +$template SwiftObjectReplicatorFile,"/var/log/swift/swift-object-replicator.log" +:syslogtag,contains,"swift-object-replicator" ?SwiftObjectReplicatorFile + +$template SwiftProxyServerFile,"/var/log/swift/swift-proxy-server.log" +:syslogtag,contains,"swift-proxy-server" ?SwiftProxyServerFile + +$template SwiftAccountReaperFile,"/var/log/swift/swift-account-reaper.log" +:syslogtag,contains,"swift-account-reaper" ?SwiftAccountReaperFile + +$template SwiftContainerServerFile,"/var/log/swift/swift-container-server.log" +:syslogtag,contains,"swift-container-server" ?SwiftContainerServerFile + +$template SwiftObjectServerFile,"/var/log/swift/swift-object-server.log" +:syslogtag,contains,"swift-object-server" ?SwiftObjectServerFile + +$template SwiftRsyncdFile,"/var/log/swift/swift-rsyncd.log" +:syslogtag,contains,"swift-rsyncd" ?SwiftRsyncdFile + +$template SwiftAccountReplicatorFile,"/var/log/swift/swift-account-replicator.log" +:syslogtag,contains,"swift-account-replicator" ?SwiftAccountReplicatorFile + +$template SwiftContainerAuditorFile,"/var/log/swift/swift-container-auditor.log" +:syslogtag,contains,"swift-container-auditor" ?SwiftContainerAuditorFile + +$template SwiftContainerUpdaterFile,"/var/log/swift/swift-container-updater.log" +:syslogtag,contains,"swift-container-updater" ?SwiftContainerUpdaterFile + +$template SwiftObjectExpirerFile,"/var/log/swift/swift-object-expirer.log" +:syslogtag,contains,"swift-object-expirer" ?SwiftObjectExpirerFile + +$template SwiftObjectUpdaterFile,"/var/log/swift/swift-object-updater.log" +:syslogtag,contains,"swift-object-updater" ?SwiftObjectUpdaterFile + $template DynFile,"/var/log/syslog.log" *.* ?DynFile & ~ diff --git a/ansible/roles/swift/tasks/start.yml b/ansible/roles/swift/tasks/start.yml index 0f0f72fe53..d5edeedf29 100644 --- a/ansible/roles/swift/tasks/start.yml +++ b/ansible/roles/swift/tasks/start.yml @@ -13,7 +13,9 @@ insecure_registry: "{{ docker_insecure_registry }}" name: swift_rsyncd image: "{{ swift_rsyncd_image_full }}" - volumes: "{{ node_config_directory }}/swift-rsyncd/:/opt/kolla/config_files/:ro" + volumes: + - "{{ node_config_directory }}/swift-rsyncd/:/opt/kolla/config_files/:ro" + - "/var/lib/kolla/dev/log:/dev/log" volumes_from: - swift_data env: @@ -36,6 +38,7 @@ volumes: - "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro" - "{{ node_config_directory }}/swift-proxy-server/:/opt/kolla/config_files/:ro" + - "/var/lib/kolla/dev/log:/dev/log" volumes_from: - swift_data env: @@ -59,6 +62,7 @@ volumes: - "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro" - "{{ node_config_directory }}/swift-account-server/:/opt/kolla/config_files/:ro" + - "/var/lib/kolla/dev/log:/dev/log" volumes_from: - swift_data env: @@ -82,6 +86,7 @@ volumes: - "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro" - "{{ node_config_directory }}/swift-account-auditor/:/opt/kolla/config_files/:ro" + - "/var/lib/kolla/dev/log:/dev/log" volumes_from: - swift_data env: @@ -105,6 +110,7 @@ volumes: - "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro" - "{{ node_config_directory }}/swift-account-replicator/:/opt/kolla/config_files/:ro" + - "/var/lib/kolla/dev/log:/dev/log" volumes_from: - swift_data env: @@ -128,6 +134,7 @@ volumes: - "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro" - "{{ node_config_directory }}/swift-account-reaper/:/opt/kolla/config_files/:ro" + - "/var/lib/kolla/dev/log:/dev/log" volumes_from: - swift_data env: @@ -151,6 +158,7 @@ volumes: - "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro" - "{{ node_config_directory }}/swift-container-server/:/opt/kolla/config_files/:ro" + - "/var/lib/kolla/dev/log:/dev/log" volumes_from: - swift_data env: @@ -174,6 +182,7 @@ volumes: - "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro" - "{{ node_config_directory }}/swift-container-auditor/:/opt/kolla/config_files/:ro" + - "/var/lib/kolla/dev/log:/dev/log" volumes_from: - swift_data env: @@ -197,6 +206,7 @@ volumes: - "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro" - "{{ node_config_directory }}/swift-container-replicator/:/opt/kolla/config_files/:ro" + - "/var/lib/kolla/dev/log:/dev/log" volumes_from: - swift_data env: @@ -220,6 +230,7 @@ volumes: - "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro" - "{{ node_config_directory }}/swift-container-updater/:/opt/kolla/config_files/:ro" + - "/var/lib/kolla/dev/log:/dev/log" volumes_from: - swift_data env: @@ -243,6 +254,7 @@ volumes: - "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro" - "{{ node_config_directory }}/swift-object-server/:/opt/kolla/config_files/:ro" + - "/var/lib/kolla/dev/log:/dev/log" volumes_from: - swift_data env: @@ -266,6 +278,7 @@ volumes: - "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro" - "{{ node_config_directory }}/swift-object-auditor/:/opt/kolla/config_files/:ro" + - "/var/lib/kolla/dev/log:/dev/log" volumes_from: - swift_data env: @@ -289,6 +302,7 @@ volumes: - "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro" - "{{ node_config_directory }}/swift-object-replicator/:/opt/kolla/config_files/:ro" + - "/var/lib/kolla/dev/log:/dev/log" volumes_from: - swift_data env: @@ -312,6 +326,7 @@ volumes: - "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro" - "{{ node_config_directory }}/swift-object-updater/:/opt/kolla/config_files/:ro" + - "/var/lib/kolla/dev/log:/dev/log" volumes_from: - swift_data env: @@ -335,6 +350,7 @@ volumes: - "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro" - "{{ node_config_directory }}/swift-object-expirer/:/opt/kolla/config_files/:ro" + - "/var/lib/kolla/dev/log:/dev/log" volumes_from: - swift_data env: diff --git a/ansible/roles/swift/templates/account-server.conf.j2 b/ansible/roles/swift/templates/account-server.conf.j2 index 0c78d2802b..782a6acd10 100644 --- a/ansible/roles/swift/templates/account-server.conf.j2 +++ b/ansible/roles/swift/templates/account-server.conf.j2 @@ -3,6 +3,9 @@ bind_ip = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['a bind_port = {{ swift_account_server_port }} devices = {{ swift_devices_mount_point }} mount_check = false +log_name = {{ service_name }} +log_facility = LOG_LOCAL0 +log_level = warning [pipeline:main] pipeline = account-server diff --git a/ansible/roles/swift/templates/container-server.conf.j2 b/ansible/roles/swift/templates/container-server.conf.j2 index 83f827545c..ceffe5bf22 100644 --- a/ansible/roles/swift/templates/container-server.conf.j2 +++ b/ansible/roles/swift/templates/container-server.conf.j2 @@ -3,6 +3,9 @@ bind_ip = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['a bind_port = {{ swift_container_server_port }} devices = {{ swift_devices_mount_point }} mount_check = false +log_name = {{ service_name }} +log_facility = LOG_LOCAL0 +log_level = warning [pipeline:main] pipeline = container-server diff --git a/ansible/roles/swift/templates/object-server.conf.j2 b/ansible/roles/swift/templates/object-server.conf.j2 index 9d27be64a3..f4eef56c6b 100644 --- a/ansible/roles/swift/templates/object-server.conf.j2 +++ b/ansible/roles/swift/templates/object-server.conf.j2 @@ -4,6 +4,10 @@ bind_port = {{ swift_object_server_port }} devices = {{ swift_devices_mount_point }} mount_check = false +log_name = {{ service_name }} +log_facility = LOG_LOCAL0 +log_level = warning + [pipeline:main] {% if service_name == 'swift-object-expirer' %} pipeline = proxy-server diff --git a/ansible/roles/swift/templates/proxy-server.conf.j2 b/ansible/roles/swift/templates/proxy-server.conf.j2 index 44dddc12b6..c600990dc6 100644 --- a/ansible/roles/swift/templates/proxy-server.conf.j2 +++ b/ansible/roles/swift/templates/proxy-server.conf.j2 @@ -2,6 +2,10 @@ bind_ip = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }} bind_port = {{ swift_proxy_server_port }} +log_name = {{ service_name }} +log_facility = LOG_LOCAL0 +log_level = warning + [pipeline:main] pipeline = catch_errors gatekeeper healthcheck cache container_sync bulk ratelimit authtoken keystoneauth slo dlo proxy-server