summaryrefslogtreecommitdiffstats
path: root/puppet
diff options
context:
space:
mode:
authorEmilien Macchi <emilien@redhat.com>2016-03-28 16:09:20 -0400
committerEmilien Macchi <emilien@redhat.com>2016-04-07 20:28:08 +0000
commit128026e368e951b6d6a799cf6d062f4d292b647b (patch)
tree23229db80a111b573f4840bf7eb69dda4cf8f9b4 /puppet
parent706c2fe4b62f95ac13ee800fc08e549180afc810 (diff)
ha/glance-fs: avoid a race condition
Create the glance-fs Pacemaker resource on one node (pacemaker master) instead of all nodes, and set verify_on_create to True. * It will avoid a race condition if Puppet is applied on 2 nodes on the same time, so the filesystem is attempted to be created once. * Verify with psc that the resource has been correctly created. The full context of the bug is decribed here: https://bugzilla.redhat.com/show_bug.cgi?id=1319384 Change-Id: I625f0879ae56e814664d1433ae47e27148779f12
Diffstat (limited to 'puppet')
-rw-r--r--puppet/manifests/overcloud_controller_pacemaker.pp23
1 files changed, 12 insertions, 11 deletions
diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
index 54176231..5a5028e2 100644
--- a/puppet/manifests/overcloud_controller_pacemaker.pp
+++ b/puppet/manifests/overcloud_controller_pacemaker.pp
@@ -654,17 +654,6 @@ if hiera('step') >= 4 {
$http_store = ['glance.store.http.Store']
$glance_store = concat($http_store, $backend_store)
- if $glance_backend == 'file' and hiera('glance_file_pcmk_manage', false) {
- $secontext = 'context="system_u:object_r:glance_var_lib_t:s0"'
- pacemaker::resource::filesystem { 'glance-fs':
- device => hiera('glance_file_pcmk_device'),
- directory => hiera('glance_file_pcmk_directory'),
- fstype => hiera('glance_file_pcmk_fstype'),
- fsoptions => join([$secontext, hiera('glance_file_pcmk_options', '')],','),
- clone_params => '',
- }
- }
-
# TODO: notifications, scrubber, etc.
include ::glance
include ::glance::config
@@ -1340,6 +1329,18 @@ if hiera('step') >= 5 {
}
# Glance
+ if $glance_backend == 'file' and hiera('glance_file_pcmk_manage', false) {
+ $secontext = 'context="system_u:object_r:glance_var_lib_t:s0"'
+ pacemaker::resource::filesystem { 'glance-fs':
+ device => hiera('glance_file_pcmk_device'),
+ directory => hiera('glance_file_pcmk_directory'),
+ fstype => hiera('glance_file_pcmk_fstype'),
+ fsoptions => join([$secontext, hiera('glance_file_pcmk_options', '')],','),
+ verify_on_create => true,
+ clone_params => '',
+ }
+ }
+
pacemaker::resource::service { $::glance::params::registry_service_name :
clone_params => 'interleave=true',
require => Pacemaker::Resource::Ocf['openstack-core'],