summaryrefslogtreecommitdiffstats
path: root/docker/services/pacemaker/manila-share.yaml
diff options
context:
space:
mode:
authorMichele Baldessari <michele@acksyn.org>2017-08-08 09:46:26 +0200
committerMichele Baldessari <michele@acksyn.org>2017-08-18 15:59:17 +0200
commitbf02ad9d7cbe0b9cb9bc25689dd8dcc1a7105f2d (patch)
treed0037c2b654d2fa3dbb2337ba67e13db7d4a995d /docker/services/pacemaker/manila-share.yaml
parent9436d87e7e3b2767bf8dcb69e9fc0eb62173e6fb (diff)
Tag the ha containers with 'pcmklatest' at deploy time
We need to tag the HA containers with a special tag so that the RA definition never changes. We do this step in THT as opposed to puppet because we need to guarantee that all images are tagged on all nodes *before* step 2 where the bundle gets created. NB: Getting the image name without the tag will require some more yaql work to get all the cases right. Right now this works only if we enforce that the image has a ':tag' at the end of the name. So far this is always the case. If things change we will need to amend this code. Co-Authored-By: Damien Ciabrini <dciabrin@redhat.com> Co-Authored-By: Sofer Athlan-Guyot <sathlang@redhat.com> Change-Id: I362e6cf26fba77d3f949b7d2fc4b35a3eab9087e
Diffstat (limited to 'docker/services/pacemaker/manila-share.yaml')
-rw-r--r--docker/services/pacemaker/manila-share.yaml35
1 files changed, 32 insertions, 3 deletions
diff --git a/docker/services/pacemaker/manila-share.yaml b/docker/services/pacemaker/manila-share.yaml
index 7103ba8b..c88737aa 100644
--- a/docker/services/pacemaker/manila-share.yaml
+++ b/docker/services/pacemaker/manila-share.yaml
@@ -59,7 +59,13 @@ outputs:
config_settings:
map_merge:
- get_attr: [ManilaBase, role_data, config_settings]
- - tripleo::profile::pacemaker::manila::share_bundle::manila_share_docker_image: &manila_share_image {get_param: DockerManilaShareImage}
+ - tripleo::profile::pacemaker::manila::share_bundle::manila_share_docker_image: &manila_share_image_pcmklatest
+ list_join:
+ - ':'
+ - - yaql:
+ data: {get_param: DockerManilaShareImage}
+ expression: $.data.rightSplit(separator => ":", maxSplits => 1)[0]
+ - 'pcmklatest'
manila::share::manage_service: false
manila::share::enabled: false
manila::host: hostgroup
@@ -93,10 +99,33 @@ outputs:
owner: manila:manila
recurse: true
docker_config:
+ step_1:
+ manila_share_image_tag:
+ start_order: 1
+ detach: false
+ net: host
+ user: root
+ command:
+ - '/bin/bash'
+ - '-c'
+ - str_replace:
+ template:
+ "/usr/bin/docker tag 'MANILASHARE_IMAGE' 'MANILASHARE_IMAGE_PCMKLATEST'"
+ params:
+ MANILASHARE_IMAGE: {get_param: DockerManilaShareImage}
+ MANILASHARE_IMAGE_PCMKLATEST: *manila_share_image_pcmklatest
+ image: {get_param: DockerManilaShareImage}
+ volumes:
+ - /etc/hosts:/etc/hosts:ro
+ - /etc/localtime:/etc/localtime:ro
+ - /dev/shm:/dev/shm:rw
+ - /etc/sysconfig/docker:/etc/sysconfig/docker:ro
+ - /usr/bin:/usr/bin:ro
+ - /var/run/docker.sock:/var/run/docker.sock:rw
step_3:
manila_share_init_logs:
start_order: 0
- image: *manila_share_image
+ image: {get_param: DockerManilaShareImage}
privileged: false
user: root
volumes:
@@ -120,7 +149,7 @@ outputs:
params:
TAGS: 'pacemaker::resource::bundle,pacemaker::property,pacemaker::constraint::location'
CONFIG: 'include ::tripleo::profile::base::pacemaker;include ::tripleo::profile::pacemaker::manila::share_bundle'
- image: *manila_share_image
+ image: {get_param: DockerManilaShareImage}
volumes:
- /etc/hosts:/etc/hosts:ro
- /etc/localtime:/etc/localtime:ro