diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-05-05 15:17:55 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-05-05 15:17:55 +0000 |
commit | 574617d007b02f98b2ac9b7e853cf4fd266fe085 (patch) | |
tree | 5a6069263cc5160b1051078370ae15785add0cd8 /docker/services/ironic-api.yaml | |
parent | c577755082a92e638ca03ae8a8bd38045bf7901c (diff) | |
parent | 58a8b282c2f244b2675a6da7aac161a53f58c288 (diff) |
Merge "Mount hostpath logs on /var/log"
Diffstat (limited to 'docker/services/ironic-api.yaml')
-rw-r--r-- | docker/services/ironic-api.yaml | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/docker/services/ironic-api.yaml b/docker/services/ironic-api.yaml index a15e74d0..5e7565cc 100644 --- a/docker/services/ironic-api.yaml +++ b/docker/services/ironic-api.yaml @@ -66,13 +66,27 @@ outputs: kolla_config: /var/lib/kolla/config_files/ironic_api.json: command: /usr/bin/ironic-api + permissions: + - path: /var/log/ironic + owner: ironic:ironic + recurse: true docker_config: + # db sync runs before permissions set by kolla_config step_3: - ironic_db_sync: + ironic_init_logs: + start_order: 0 image: &ironic_image list_join: - '/' - [ {get_param: DockerNamespace}, {get_param: DockerIronicApiImage} ] + privileged: false + user: root + volumes: + - /var/log/containers/ironic:/var/log/ironic + command: ['/bin/bash', '-c', 'chown -R ironic:ironic /var/log/ironic'] + ironic_db_sync: + start_order: 1 + image: *ironic_image net: host privileged: false detach: false @@ -81,6 +95,7 @@ outputs: - {get_attr: [ContainersCommon, volumes]} - - /var/lib/config-data/ironic/etc/:/etc/:ro + - /var/log/containers/ironic:/var/log/ironic command: ['ironic-dbsync', '--config-file', '/etc/ironic/ironic.conf'] step_4: ironic_api: @@ -95,8 +110,14 @@ outputs: - - /var/lib/kolla/config_files/ironic_api.json:/var/lib/kolla/config_files/config.json:ro - /var/lib/config-data/ironic/etc/:/etc/:ro + - /var/log/containers/ironic:/var/log/ironic environment: - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS + host_prep_tasks: + - name: create persistent logs directory + file: + path: /var/log/containers/ironic + state: directory upgrade_tasks: - name: Stop and disable ironic_api service tags: step2 |