aboutsummaryrefslogtreecommitdiffstats
path: root/puppet
diff options
context:
space:
mode:
authorSofer Athlan-Guyot <sathlang@redhat.com>2017-08-08 15:18:42 +0200
committerSofer Athlan-Guyot <sathlang@redhat.com>2017-08-08 15:18:42 +0200
commit42d8a1c9440d4f37830bdcbda9c88a6bf39265f5 (patch)
treeef1849d24d89cf5089f90b9f15f4fbd69712447d /puppet
parent5bf7d6582b2346a9c1671430ebead6c358508863 (diff)
Make cinder-manage db sync run on only one controller during upgrade
We got to ensure that the cinder-manage db sync is run on only one controller. Change-Id: I88a6aa4c49d893b95a26795fbfcf163a780fd0bc Closes-Bug: #1709315
Diffstat (limited to 'puppet')
-rw-r--r--puppet/services/pacemaker/cinder-volume.yaml20
1 files changed, 13 insertions, 7 deletions
diff --git a/puppet/services/pacemaker/cinder-volume.yaml b/puppet/services/pacemaker/cinder-volume.yaml
index a1134f3e..f4675875 100644
--- a/puppet/services/pacemaker/cinder-volume.yaml
+++ b/puppet/services/pacemaker/cinder-volume.yaml
@@ -66,11 +66,17 @@ outputs:
resource: openstack-cinder-volume
state: disable
wait_for_resource: true
- - name: Sync cinder DB
+ - name: get bootstrap nodeid
tags: step5
- command: cinder-manage db sync
- - name: Start cinder_volume service (pacemaker)
- tags: step5
- pacemaker_resource:
- resource: openstack-cinder-volume
- state: enable
+ command: hiera bootstrap_nodeid
+ register: bootstrap_node
+ - block:
+ - name: Sync cinder DB
+ tags: step5
+ command: cinder-manage db sync
+ - name: Start cinder_volume service (pacemaker)
+ tags: step5
+ pacemaker_resource:
+ resource: openstack-cinder-volume
+ state: enable
+ when: bootstrap_node.stdout == ansible_hostname