Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge "Don't create symlink for swift container logs"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Jun 21, 2019
2 parents 92a0b41 + d3a9614 commit eb2e7e4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
12 changes: 3 additions & 9 deletions deployment/swift/swift-proxy-container-puppet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
27 changes: 17 additions & 10 deletions deployment/swift/swift-storage-container-puppet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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}
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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}
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit eb2e7e4

Please sign in to comment.