diff --git a/deployment_scripts/puppet/manifests/enable_quorum.pp b/deployment_scripts/puppet/manifests/enable_quorum.pp index e8867dd..b6ba3f6 100644 --- a/deployment_scripts/puppet/manifests/enable_quorum.pp +++ b/deployment_scripts/puppet/manifests/enable_quorum.pp @@ -18,17 +18,16 @@ $corosync_roles = hiera_array('lma::corosync_roles') $network_metadata = hiera('network_metadata') $nodes = get_nodes_hash_by_roles($network_metadata, $corosync_roles) -Cs_property { - provider => 'crm', -} - if count($nodes) > 2 { $policy = 'stop' } else { $policy = 'ignore' } +# The default provider ('pcs') fails to change the property's value so we have +# to force the use of 'crm' cs_property { 'no-quorum-policy': - ensure => present, - value => $policy, + ensure => present, + value => $policy, + provider => 'crm', } diff --git a/deployment_tasks.yaml b/deployment_tasks.yaml index 0ebbcc1..11954e5 100644 --- a/deployment_tasks.yaml +++ b/deployment_tasks.yaml @@ -34,7 +34,7 @@ strategy: type: parallel -# This task needs to be reexecuted to recheck configuration +# This task needs to be reexecuted to recheck the configuration - id: lma-es-check-configuration type: puppet groups: [primary-elasticsearch_kibana] @@ -144,13 +144,14 @@ reexecute_on: - deploy_changes -# This task needs to be reexecuted to reconfigure the no-quorum-policy each -# time the cluster is scaled. -- id: lma-enable-quorum +# This task needs to be reexecuted to reconfigure the no-quorum-policy every +# time the cluster is scaled up or down. In case of scale up, it should happen +# after the new nodes have added themselves to the Pacemaker cluster. +- id: lma-es-kibana-enable-quorum type: puppet - groups: [primary-elasticsearch_kibana] - requires: [lma-es-kibana-haproxy] - required_for: [deploy_end] + role: [primary-elasticsearch_kibana] + requires: [post_deployment_start] + required_for: [post_deployment_end] parameters: puppet_manifest: "puppet/manifests/enable_quorum.pp" puppet_modules: "puppet/modules" diff --git a/node_roles.yaml b/node_roles.yaml index a4c4ce9..c75e7c3 100644 --- a/node_roles.yaml +++ b/node_roles.yaml @@ -12,3 +12,10 @@ elasticsearch_kibana: - compute - cinder - ceph-osd + # 'update_required' is needed to make sure that the already deployed nodes + # are updated in the same run as the new nodes. The 'reexecute_on' stanza + # doesn't guarantee this since the reexecuted tasks are run after the new + # nodes are deployed. + update_required: + - primary-elasticsearch_kibana + - elasticsearch_kibana