From 128026e368e951b6d6a799cf6d062f4d292b647b Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Mon, 28 Mar 2016 16:09:20 -0400 Subject: 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 --- puppet/manifests/overcloud_controller_pacemaker.pp | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'puppet/manifests') 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'], -- cgit 1.2.3-korg