diff options
author | 2017-01-25 23:04:41 +0000 | |
---|---|---|
committer | 2017-01-25 23:04:41 +0000 | |
commit | 6d94616a7143b0d2c9b5a117472c7c0d730cab4a (patch) | |
tree | 1fc45812caa4e8c73e5b6c145f4e1a6dfdd88b4c /manifests/profile/pacemaker/cinder/volume.pp | |
parent | b7cde684f20881c480681abaec18503502824b80 (diff) | |
parent | f9efeb158261fbdad206ea072c4c628636c1a5f4 (diff) |
Merge "Composable HA"
Diffstat (limited to 'manifests/profile/pacemaker/cinder/volume.pp')
-rw-r--r-- | manifests/profile/pacemaker/cinder/volume.pp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/manifests/profile/pacemaker/cinder/volume.pp b/manifests/profile/pacemaker/cinder/volume.pp index b03a1f4..0d6a598 100644 --- a/manifests/profile/pacemaker/cinder/volume.pp +++ b/manifests/profile/pacemaker/cinder/volume.pp @@ -27,9 +27,14 @@ # for more details. # Defaults to hiera('step') # +# [*pcs_tries*] +# (Optional) The number of times pcs commands should be retried. +# Defaults to hiera('pcs_tries', 20) +# class tripleo::profile::pacemaker::cinder::volume ( $bootstrap_node = hiera('cinder_volume_short_bootstrap_node_name'), $step = hiera('step'), + $pcs_tries = hiera('pcs_tries', 20), ) { Service <| tag == 'cinder::volume' |> { hasrestart => true, @@ -46,6 +51,15 @@ class tripleo::profile::pacemaker::cinder::volume ( include ::tripleo::profile::base::cinder::volume + if $step >= 2 { + pacemaker::property { 'cinder-volume-role-node-property': + property => 'cinder-volume-role', + value => true, + tries => $pcs_tries, + node => $::hostname, + } + } + if $step >= 3 and $pacemaker_master and hiera('stack_action') == 'UPDATE' { Cinder_api_paste_ini<||> ~> Tripleo::Pacemaker::Resource_restart_flag["${::cinder::params::volume_service}"] Cinder_config<||> ~> Tripleo::Pacemaker::Resource_restart_flag["${::cinder::params::volume_service}"] @@ -54,7 +68,13 @@ class tripleo::profile::pacemaker::cinder::volume ( if $step >= 5 and $pacemaker_master { pacemaker::resource::service { $::cinder::params::volume_service : - op_params => 'start timeout=200s stop timeout=200s', + op_params => 'start timeout=200s stop timeout=200s', + tries => $pcs_tries, + location_rule => { + resource_discovery => 'exclusive', + score => 0, + expression => ['cinder-volume-role eq true'], + } } } |