Merge "Set auth flag so ceilometer auth is enabled"
[apex-tripleo-heat-templates.git] / puppet / services / pacemaker.yaml
index 0b9ab9f..28fcbd6 100644 (file)
@@ -39,6 +39,12 @@ parameters:
     description: The password for the 'pcsd' user for pacemaker.
     hidden: true
     default: ''
+  CorosyncSettleTries:
+    type: number
+    description: Number of tries for cluster settling. This has the
+                 same default as the pacemaker puppet module. Override
+                 to a smaller value when in need to replace a controller node.
+    default: 360
   FencingConfig:
     default: {}
     description: |
@@ -81,10 +87,16 @@ parameters:
         \[(?<pid>[^ ]*)\]
         (?<host>[^ ]*)
         (?<message>.*)$/
+
+  EnableLoadBalancer:
+    default: true
+    description: Whether to deploy a LoadBalancer on the Controller
+    type: boolean
+
   PacemakerResources:
     type: comma_delimited_list
     description: List of resources managed by pacemaker
-    default: ['rabbitmq','haproxy']
+    default: ['rabbitmq', 'galera']
 
 outputs:
   role_data:
@@ -101,6 +113,7 @@ outputs:
         pacemaker::resource_defaults::defaults:
           resource-stickiness: { value: INFINITY }
         corosync_token_timeout: 10000
+        pacemaker::corosync::settle_tries: {get_param: CorosyncSettleTries}
         tripleo.pacemaker.firewall_rules:
           '130 pacemaker tcp':
             proto: 'tcp'
@@ -129,12 +142,20 @@ outputs:
           tags: step0,validation
           pacemaker_cluster: state=online check_and_fail=true
         - name: Stop pacemaker cluster
-          tags: step1
+          tags: step2
           pacemaker_cluster: state=offline
         - name: Start pacemaker cluster
           tags: step4
           pacemaker_cluster: state=online
         - name: Check pacemaker resource
           tags: step4
-          pacemaker_resource: state=started resource={{item}} check_mode=true wait_for_resource=true timeout=200
+          pacemaker_is_active:
+            resource: "{{ item }}"
+            max_wait: 500
           with_items: {get_param: PacemakerResources}
+        - name: Check pacemaker haproxy resource
+          tags: step4
+          pacemaker_is_active:
+            resource: haproxy
+            max_wait: 500
+          when: {get_param: EnableLoadBalancer}