Merge "Don't create symlink for swift container logs"

This commit is contained in:
Zuul 2019-06-21 17:06:09 +00:00 committed by Gerrit Code Review
commit eb2e7e4858
2 changed files with 20 additions and 19 deletions

View File

@ -410,6 +410,7 @@ outputs:
- /run:/run
- /srv/node:/srv/node
- /dev:/dev
- /var/log/containers/swift:/var/log/swift:z
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
- if:
@ -439,14 +440,7 @@ outputs:
with_items:
- { 'path': /srv/node, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/swift, 'setype': svirt_sandbox_file_t }
- stat: path=/var/log/swift
register: swift_log_stat
- name: Create swift logging symlink
file:
src: /var/log/swift
dest: /var/log/containers/swift
state: link
when: swift_log_stat.stat.exists
- { 'path': /var/log/containers/swift, 'setype': svirt_sandbox_file_t }
- name: Check if rsyslog exists
shell: systemctl list-unit-files --type=service | grep -q rsyslog
register: rsyslog_config
@ -456,7 +450,7 @@ outputs:
copy:
content: |
# Fix for https://bugs.launchpad.net/tripleo/+bug/1776180
local2.* /var/log/swift/swift.log
local2.* /var/log/containers/swift/swift.log
& stop
dest: /etc/rsyslog.d/openstack-swift.conf
register: logconfig

View File

@ -339,6 +339,7 @@ outputs:
- /srv/node:/srv/node:z
- /dev:/dev
- /var/cache/swift:/var/cache/swift:z
- /var/log/containers/swift:/var/log/swift:z
environment: &kolla_env
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
swift_account_replicator:
@ -355,6 +356,7 @@ outputs:
- /srv/node:/srv/node
- /dev:/dev
- /var/cache/swift:/var/cache/swift
- /var/log/containers/swift:/var/log/swift:z
environment: *kolla_env
swift_container_auditor:
image: &swift_container_image {get_param: ContainerSwiftContainerImage}
@ -370,6 +372,7 @@ outputs:
- /srv/node:/srv/node
- /dev:/dev
- /var/cache/swift:/var/cache/swift
- /var/log/containers/swift:/var/log/swift:z
environment: *kolla_env
swift_container_replicator:
image: *swift_container_image
@ -385,6 +388,7 @@ outputs:
- /srv/node:/srv/node
- /dev:/dev
- /var/cache/swift:/var/cache/swift
- /var/log/containers/swift:/var/log/swift:z
environment: *kolla_env
swift_object_auditor:
@ -401,6 +405,7 @@ outputs:
- /srv/node:/srv/node
- /dev:/dev
- /var/cache/swift:/var/cache/swift
- /var/log/containers/swift:/var/log/swift:z
environment: *kolla_env
swift_object_replicator:
image: *swift_object_image
@ -416,6 +421,7 @@ outputs:
- /srv/node:/srv/node
- /dev:/dev
- /var/cache/swift:/var/cache/swift
- /var/log/containers/swift:/var/log/swift:z
environment: *kolla_env
-
swift_account_reaper:
@ -432,6 +438,7 @@ outputs:
- /srv/node:/srv/node:z
- /dev:/dev
- /var/cache/swift:/var/cache/swift:z
- /var/log/containers/swift:/var/log/swift:z
environment: *kolla_env
swift_account_server:
image: *swift_account_image
@ -449,6 +456,7 @@ outputs:
- /srv/node:/srv/node
- /dev:/dev
- /var/cache/swift:/var/cache/swift
- /var/log/containers/swift:/var/log/swift:z
environment: *kolla_env
swift_container_updater:
image: *swift_container_image
@ -464,6 +472,7 @@ outputs:
- /srv/node:/srv/node
- /dev:/dev
- /var/cache/swift:/var/cache/swift
- /var/log/containers/swift:/var/log/swift:z
environment: *kolla_env
swift_container_server:
image: *swift_container_image
@ -481,6 +490,7 @@ outputs:
- /srv/node:/srv/node
- /dev:/dev
- /var/cache/swift:/var/cache/swift
- /var/log/containers/swift:/var/log/swift:z
environment: *kolla_env
swift_object_expirer:
image: &swift_proxy_image {get_param: ContainerSwiftProxyImage}
@ -496,6 +506,7 @@ outputs:
- /srv/node:/srv/node
- /dev:/dev
- /var/cache/swift:/var/cache/swift
- /var/log/containers/swift:/var/log/swift:z
environment: *kolla_env
swift_object_updater:
image: *swift_object_image
@ -511,6 +522,7 @@ outputs:
- /srv/node:/srv/node
- /dev:/dev
- /var/cache/swift:/var/cache/swift
- /var/log/containers/swift:/var/log/swift:z
environment: *kolla_env
swift_object_server:
image: *swift_object_image
@ -528,6 +540,7 @@ outputs:
- /srv/node:/srv/node
- /dev:/dev
- /var/cache/swift:/var/cache/swift
- /var/log/containers/swift:/var/log/swift:z
environment: *kolla_env
swift_rsync:
image: *swift_object_image
@ -543,6 +556,7 @@ outputs:
- /var/lib/config-data/puppet-generated/swift/:/var/lib/kolla/config_files/src:ro
- /srv/node:/srv/node
- /dev:/dev
- /var/log/containers/swift:/var/log/swift:z
# /var/cache/swift not needed in this container
environment: *kolla_env
- if:
@ -562,6 +576,7 @@ outputs:
- /srv/node:/srv/node
- /dev:/dev
- /var/cache/swift:/var/cache/swift
- /var/log/containers/swift:/var/log/swift:z
- {}
host_prep_tasks:
@ -573,6 +588,7 @@ outputs:
with_items:
- { 'path': /srv/node, 'setype': svirt_sandbox_file_t }
- { 'path': /var/cache/swift, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/containers/swift, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/swift, 'setype': var_log_t }
- { 'path': /var/log/containers, 'setype': svirt_sandbox_file_t }
- name: Set swift_use_local_disks fact
@ -583,15 +599,6 @@ outputs:
path: "/srv/node/d1"
state: directory
when: swift_use_local_disks
- stat: path=/var/log/swift
register: swift_log_stat
- name: Create swift logging symlink
file:
src: /var/log/swift
dest: /var/log/containers/swift
state: link
ignore_errors: "{{ ansible_check_mode|bool }}"
when: swift_log_stat.stat.exists
- name: swift logs readme
copy:
dest: /var/log/swift/readme.txt
@ -608,7 +615,7 @@ outputs:
copy:
content: |
# Fix for https://bugs.launchpad.net/tripleo/+bug/1776180
local2.* /var/log/swift/swift.log
local2.* /var/log/containers/swift/swift.log
& stop
dest: /etc/rsyslog.d/openstack-swift.conf
register: logconfig