aboutsummaryrefslogtreecommitdiffstats
path: root/docker/services/swift-storage.yaml
diff options
context:
space:
mode:
authorFlavio Percoco <flaper87@gmail.com>2017-03-07 17:12:36 +0100
committerBogdan Dobrelya <bdobreli@redhat.com>2017-05-05 12:30:17 +0200
commit58a8b282c2f244b2675a6da7aac161a53f58c288 (patch)
treec8bd16110e8ef42e3b3d25ee518a76a96f614c56 /docker/services/swift-storage.yaml
parent840a5dd7713de5fde67bc76a7753657cca00e794 (diff)
Mount hostpath logs on /var/log
Some containers are using the logs named volume for collecting logs written to `/var/log`. We should make this consistent for all the containers. This patch also cleans up some mounts that weren't needed for some services. For example, glance-api doesn't need `/run` to be mounted. Other changes: * Rework log volumes to hostpath mounts to omit slow COW writes. * Add kolla_config's permission and host_prep_tasks create and manage hostpath mounted log dirs permissions. * Rework data owning init containers to kolla_config permissions * When a step wants KOLLA_BOOTSTRAP or DB sync, use logs data owning init containers to set permissions for logs. This is required because kolla bootsrap and DB sync runs before the kolla config stage and there is yet permissions set for logs. * In order to address hybrid cases for host services vs containerized ones to access logs having different UIDs, persist containerized services' logs into separate directories (an upgrade impact) * Ensure host prep tasks to create /var/log/containers/ and /var/lib/ sub-directories for services * Fix missing /etc/httpd, /var/www config-data mounts for zaqar/ironic * Fix YAML indentation and drop strings quotation. Co-authored-by: Bogdan Dobrelya <bdobreli@redhat.com> Partial blueprint containerized-services-logs Change-Id: I53e737120bf0121bd28667f355b6f29f1b2a6b82
Diffstat (limited to 'docker/services/swift-storage.yaml')
-rw-r--r--docker/services/swift-storage.yaml24
1 files changed, 22 insertions, 2 deletions
diff --git a/docker/services/swift-storage.yaml b/docker/services/swift-storage.yaml
index b4a6a940..6d60dde6 100644
--- a/docker/services/swift-storage.yaml
+++ b/docker/services/swift-storage.yaml
@@ -96,6 +96,10 @@ outputs:
command: /usr/bin/swift-object-updater /etc/swift/object-server.conf
/var/lib/kolla/config_files/swift_object_server.json:
command: /usr/bin/swift-object-server /etc/swift/object-server.conf
+ permissions:
+ - path: /var/log/swift
+ owner: swift:swift
+ recurse: true
docker_config:
step_3:
# The puppet config sets this up but we don't have a way to mount the named
@@ -125,6 +129,7 @@ outputs:
- /run:/run
- /srv/node:/srv/node
- /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: &kolla_env
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
swift_account_reaper:
@@ -141,6 +146,7 @@ outputs:
- /run:/run
- /srv/node:/srv/node
- /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_account_replicator:
image: *swift_account_image
@@ -156,6 +162,7 @@ outputs:
- /run:/run
- /srv/node:/srv/node
- /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_account_server:
image: *swift_account_image
@@ -171,6 +178,7 @@ outputs:
- /run:/run
- /srv/node:/srv/node
- /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_container_auditor:
image: &swift_container_image
@@ -189,6 +197,7 @@ outputs:
- /run:/run
- /srv/node:/srv/node
- /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_container_replicator:
image: *swift_container_image
@@ -204,6 +213,7 @@ outputs:
- /run:/run
- /srv/node:/srv/node
- /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_container_updater:
image: *swift_container_image
@@ -219,6 +229,7 @@ outputs:
- /run:/run
- /srv/node:/srv/node
- /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_container_server:
image: *swift_container_image
@@ -234,6 +245,7 @@ outputs:
- /run:/run
- /srv/node:/srv/node
- /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_object_auditor:
image: &swift_object_image
@@ -252,6 +264,7 @@ outputs:
- /run:/run
- /srv/node:/srv/node
- /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_object_expirer:
image: *swift_proxy_image
@@ -267,6 +280,7 @@ outputs:
- /run:/run
- /srv/node:/srv/node
- /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_object_replicator:
image: *swift_object_image
@@ -282,6 +296,7 @@ outputs:
- /run:/run
- /srv/node:/srv/node
- /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_object_updater:
image: *swift_object_image
@@ -297,6 +312,7 @@ outputs:
- /run:/run
- /srv/node:/srv/node
- /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_object_server:
image: *swift_object_image
@@ -312,12 +328,16 @@ outputs:
- /run:/run
- /srv/node:/srv/node
- /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
host_prep_tasks:
- - name: create /srv/node
+ - name: create persistent directories
file:
- path: /srv/node
+ path: "{{ item }}"
state: directory
+ with_items:
+ - /var/log/containers/swift
+ - /srv/node
upgrade_tasks:
- name: Stop and disable swift storage services
tags: step2