aboutsummaryrefslogtreecommitdiffstats
path: root/docker/services/aodh-api.yaml
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2017-05-17 08:58:57 -0400
committerDan Prince <dprince@redhat.com>2017-05-22 12:04:42 -0400
commit51da97d04a2cbc81ad4b56a8a91c6dd43d5afe81 (patch)
tree8edc34990ff94bd8db120fe45825cbf2458b1f36 /docker/services/aodh-api.yaml
parente8ab5381dcdc9321aab8d3bb0dcb402439f89664 (diff)
docker bootstrap service commands
This patch guards db syncs and initialization code from executing on multiple nodes at the same time by using the new bootstrap_host_exec script. This helper script checks to make sure the container is executing on the "bootstrap host" for the specified service (arg 0) and then if it matches runs the specified command. Depends-On: If25f217bbb592edab4e1dde53ca99ed93c0e146c Depends-On: Ic1585bae27c318bd6bafc287e905f2ed250cce0f Change-Id: I0c864ca093ea476248b619d8c88477ef0b64e2eb Closes-Bug: 1688380
Diffstat (limited to 'docker/services/aodh-api.yaml')
-rw-r--r--docker/services/aodh-api.yaml3
1 files changed, 2 insertions, 1 deletions
diff --git a/docker/services/aodh-api.yaml b/docker/services/aodh-api.yaml
index 8a02d8fd..f802e4e6 100644
--- a/docker/services/aodh-api.yaml
+++ b/docker/services/aodh-api.yaml
@@ -100,13 +100,14 @@ outputs:
net: host
privileged: false
detach: false
+ user: root
volumes:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- /var/lib/config-data/aodh/etc/aodh/:/etc/aodh/:ro
- /var/log/containers/aodh:/var/log/aodh
- command: /usr/bin/aodh-dbsync
+ command: "/usr/bin/bootstrap_host_exec aodh_api su aodh -s /bin/bash -c /usr/bin/aodh-dbsync"
step_4:
aodh_api:
image: *aodh_image