aboutsummaryrefslogtreecommitdiffstats
path: root/docker/services/nova-api.yaml
diff options
context:
space:
mode:
authorMartin André <m.andre@redhat.com>2017-06-21 16:02:55 +0200
committerMartin André <m.andre@redhat.com>2017-07-10 11:13:25 +0200
commitcf18e865d14adc319b6c2dfafd650f32dad4d853 (patch)
tree86231cde72c4adb55d4e06e1a8f17836dea834de /docker/services/nova-api.yaml
parent766de0cacb18171264d2a699ac48cacb8d35a152 (diff)
Copy only generated puppet files into the container
This solves a problem with bind-mounts when the containers are holding files descriptors open. At the same time this makes the template more robust to puppet changes since new config files will be available in the containers without needing to update the templates. Partial-Bug: #1698323 Change-Id: Ia4ad6d77387e3dc354cd131c2f9756939fb8f736
Diffstat (limited to 'docker/services/nova-api.yaml')
-rw-r--r--docker/services/nova-api.yaml24
1 files changed, 17 insertions, 7 deletions
diff --git a/docker/services/nova-api.yaml b/docker/services/nova-api.yaml
index 5d410fb6..93935cad 100644
--- a/docker/services/nova-api.yaml
+++ b/docker/services/nova-api.yaml
@@ -83,6 +83,11 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/nova_api.json:
command: /usr/bin/nova-api
+ config_files:
+ - source: "/var/lib/kolla/config_files/src/*"
+ dest: "/"
+ merge: true
+ preserve_properties: true
permissions:
- path: /var/log/nova
owner: nova:nova
@@ -107,11 +112,10 @@ outputs:
net: host
detach: false
user: root
- volumes: &nova_api_volumes
+ volumes: &nova_api_bootstrap_volumes
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- - /var/lib/kolla/config_files/nova_api.json:/var/lib/kolla/config_files/config.json:ro
- /var/lib/config-data/nova/etc/nova/:/etc/nova/:ro
- /var/log/containers/nova:/var/log/nova
command: "/usr/bin/bootstrap_host_exec nova_api su nova -s /bin/bash -c '/usr/bin/nova-manage api_db sync'"
@@ -124,14 +128,14 @@ outputs:
net: host
detach: false
user: root
- volumes: *nova_api_volumes
+ volumes: *nova_api_bootstrap_volumes
command: "/usr/bin/bootstrap_host_exec nova_api su nova -s /bin/bash -c '/usr/bin/nova-manage cell_v2 map_cell0'"
nova_api_create_default_cell:
start_order: 2
image: *nova_api_image
net: host
detach: false
- volumes: *nova_api_volumes
+ volumes: *nova_api_bootstrap_volumes
# NOTE: allowing the exit code 2 is a dirty way of making
# this idempotent (if the resource already exists a conflict
# is raised)
@@ -143,7 +147,7 @@ outputs:
image: *nova_api_image
net: host
detach: false
- volumes: *nova_api_volumes
+ volumes: *nova_api_bootstrap_volumes
user: root
command: "/usr/bin/bootstrap_host_exec nova_api su nova -s /bin/bash -c '/usr/bin/nova-manage db sync'"
step_4:
@@ -154,7 +158,13 @@ outputs:
user: nova
privileged: true
restart: always
- volumes: *nova_api_volumes
+ volumes:
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/nova_api.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/puppet-generated/nova/:/var/lib/kolla/config_files/src:ro
+ - /var/log/containers/nova:/var/log/nova
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
step_5:
@@ -163,7 +173,7 @@ outputs:
image: *nova_api_image
net: host
detach: false
- volumes: *nova_api_volumes
+ volumes: *nova_api_bootstrap_volumes
user: root
command: "/usr/bin/bootstrap_host_exec nova_api su nova -s /bin/bash -c '/usr/bin/nova-manage cell_v2 discover_hosts'"
host_prep_tasks: