Perform basic setup of pacemaker cluster on controllers
authorGiulio Fidente <gfidente@redhat.com>
Fri, 10 Apr 2015 21:40:26 +0000 (23:40 +0200)
committerGiulio Fidente <gfidente@redhat.com>
Tue, 14 Apr 2015 11:30:38 +0000 (07:30 -0400)
Change-Id: Ia2e4eae619ca95c0f417f713676732eb4f01304b
Depends-On: I9563eec0a2266deb2ebef2e3d76ae89d39b2be29

controller.yaml
overcloud-without-mergepy.yaml
puppet/controller-puppet.yaml
puppet/hieradata/controller.yaml
puppet/manifests/overcloud_controller.pp

index 9c0fa0c..4a21bac 100644 (file)
@@ -59,6 +59,9 @@ parameters:
     default: 'br-ex'
     description: Interface where virtual ip will be assigned.
     type: string
+  CorosyncAuthKey:
+    description: Auth encryption key for corosync
+    type: string
   Debug:
     default: ''
     description: Set to True to enable debugging on all services.
index d8c84bc..f61536c 100644 (file)
@@ -516,6 +516,11 @@ resources:
   HeatAuthEncryptionKey:
     type: OS::Heat::RandomString
 
+  CorosyncAuthKey:
+    type: OS::Heat::RandomString
+    properties:
+      length: 128
+
   Controller:
     type: OS::Heat::ResourceGroup
     properties:
@@ -535,6 +540,7 @@ resources:
           CloudName: {get_param: CloudName}
           ControlVirtualInterface: {get_param: ControlVirtualInterface}
           ControllerExtraConfig: {get_param: controllerExtraConfig}
+          CorosyncAuthKey: {get_resource: CorosyncAuthKey}
           Debug: {get_param: Debug}
           EnableGalera: {get_param: EnableGalera}
           ExtraConfig: {get_param: ExtraConfig}
index 780c8cf..9184a92 100644 (file)
@@ -59,6 +59,9 @@ parameters:
     default: 'br-ex'
     description: Interface where virtual ip will be assigned.
     type: string
+  CorosyncAuthKey:
+    description: Auth encryption key for corosync
+    type: string
   Debug:
     default: ''
     description: Set to True to enable debugging on all services.
@@ -433,6 +436,7 @@ resources:
         bootstack_nodeid: {get_attr: [Controller, name]}
         controller_host: {get_attr: [Controller, networks, ctlplane, 0]}
         controller_virtual_ip: {get_param: VirtualIP}
+        corosync_auth_key: {get_param: CorosyncAuthKey}
         neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
         heat.watch_server_url:
           list_join:
@@ -628,6 +632,10 @@ resources:
                 bootstack_nodeid: {get_input: bootstack_nodeid}
                 controller_host: {get_input: controller_host} #local-ipv4
 
+                # Pacemaker
+                corosync::authkey: {get_input: corosync_auth_key}
+                corosync::bind_address: {get_input: controller_host}
+
                 # Swift
                 swift::proxy::proxy_local_net_ip: {get_input: controller_host}
                 swift::proxy::authtoken::auth_uri: {get_input: keystone_auth_uri}
index 47f358a..1e1f50a 100644 (file)
@@ -70,6 +70,10 @@ heat::engine::heat_stack_user_role: ''
 heat::engine::configure_delegated_roles: false
 heat::engine::trusts_delegated_roles: []
 
+# pacemaker
+corosync::authkey_source: 'string'
+corosync::multicast_address: broadcast
+
 mysql::server::manage_config_file: true
 
 tripleo::loadbalancer::keystone_admin: true
index 3e3f2e7..0727eda 100644 (file)
@@ -31,6 +31,23 @@ if hiera('step') >= 1 {
     controller_hosts => $controller_node_ips,
   }
 
+  class { '::corosync':
+    quorum_members => $controller_node_ips,
+  }
+  corosync::service { 'pacemaker':
+    version => '0',
+  }
+  service { 'pacemaker':
+    ensure  => running,
+    require => Service['corosync'],
+  }
+  cs_property { 'stonith-enabled':
+    value => 'false',
+  }
+  cs_property { 'no-quorum-policy':
+    value => 'ignore',
+  }
+
 }
 
 if hiera('step') >= 2 {