Allow to enable IPv6 on Corosync
authorEmilien Macchi <emilien@redhat.com>
Wed, 13 Jan 2016 18:04:22 +0000 (13:04 -0500)
committerGiulio Fidente <gfidente@redhat.com>
Sat, 5 Mar 2016 02:23:04 +0000 (03:23 +0100)
To enable IPv6 in Corosync, you'll need to set the --ipv6 parameter when
building the cluster.

To do so, we need to specify this parameter in puppet configuration when
running ::pacemaker::corosync class.

So we have now a new parameter: CorosyncIPv6 which is a boolean, False
by default. If set to True, it will pass right options to enable IPv6
when building the Pacemaker cluster.

Change-Id: I485f1399964ddd7a201ed19ec6580b8a136b3acd

environments/network-isolation-v6.yaml
overcloud.yaml
puppet/controller.yaml
puppet/manifests/overcloud_controller_pacemaker.pp

index 8a3d806..d1d0818 100644 (file)
@@ -43,6 +43,8 @@ resource_registry:
   OS::TripleO::BlockStorage::Ports::StorageMgmtPort: ../network/ports/storage_mgmt_v6.yaml
 
 parameter_defaults:
+  # Enable IPv6 for Corosync. This is required when Corosync is using an IPv6 IP in the cluster.
+  CorosyncIPv6: True
   # Enable IPv6 for MongoDB. This is required when MongoDB is using an IPv6 IP.
   MongoDbIPv6: True
   # Enable various IPv6 features in Nova.
index c91d2e1..0f33665 100644 (file)
@@ -77,6 +77,10 @@ parameters:
     default: []
     description: Should be used for arbitrary ips.
     type: json
+  CorosyncIPv6:
+    default: false
+    description: Enable IPv6 in Corosync
+    type: boolean
   Debug:
     default: ''
     description: Set to True to enable debugging on all services.
@@ -906,6 +910,7 @@ resources:
           CloudDomain: {get_param: CloudDomain}
           ControlVirtualInterface: {get_param: ControlVirtualInterface}
           ControllerExtraConfig: {get_param: controllerExtraConfig}
+          CorosyncIPv6: {get_param: CorosyncIPv6}
           Debug: {get_param: Debug}
           EnableFencing: {get_param: EnableFencing}
           ManageFirewall: {get_param: ManageFirewall}
index 733a9d7..6b12147 100644 (file)
@@ -115,6 +115,10 @@ parameters:
     default: 'br-ex'
     description: Interface where virtual ip will be assigned.
     type: string
+  CorosyncIPv6:
+    default: false
+    description: Enable IPv6 in Corosync
+    type: boolean
   Debug:
     default: ''
     description: Set to True to enable debugging on all services.
@@ -1158,6 +1162,7 @@ resources:
         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
         nova_enable_db_purge: {get_param: NovaEnableDBPurge}
         nova_ipv6: {get_param: NovaIPv6}
+        corosync_ipv6: {get_param: CorosyncIPv6}
         nova_password: {get_param: NovaPassword}
         nova_dsn:
           list_join:
@@ -1304,6 +1309,7 @@ resources:
                 enable_fencing: {get_input: enable_fencing}
                 enable_load_balancer: {get_input: enable_load_balancer}
                 hacluster_pwd: {get_input: pcsd_password}
+                corosync_ipv6: {get_input: corosync_ipv6}
                 tripleo::fencing::config: {get_input: fencing_config}
 
                 # Swift
index fb36893..1a13167 100644 (file)
@@ -62,6 +62,12 @@ if hiera('step') >= 1 {
   }
 
   $pacemaker_cluster_members = downcase(regsubst(hiera('controller_node_names'), ',', ' ', 'G'))
+  $corosync_ipv6 = str2bool(hiera('corosync_ipv6', false))
+  if $corosync_ipv6 {
+    $cluster_setup_extras = { '--ipv6' => '' }
+  } else {
+    $cluster_setup_extras = {}
+  }
   user { 'hacluster':
     ensure => present,
   } ->
@@ -69,8 +75,9 @@ if hiera('step') >= 1 {
     hacluster_pwd => hiera('hacluster_pwd'),
   } ->
   class { '::pacemaker::corosync':
-    cluster_members => $pacemaker_cluster_members,
-    setup_cluster   => $pacemaker_master,
+    cluster_members      => $pacemaker_cluster_members,
+    setup_cluster        => $pacemaker_master,
+    cluster_setup_extras => $cluster_setup_extras,
   }
   class { '::pacemaker::stonith':
     disable => !$enable_fencing,