Support the deployment of Ceph over IPv6
authorGiulio Fidente <gfidente@redhat.com>
Mon, 25 Jan 2016 12:05:57 +0000 (13:05 +0100)
committerAttila Darazs <adarazs@redhat.com>
Thu, 10 Mar 2016 17:21:39 +0000 (18:21 +0100)
To deploy Ceph on IPv6, we need to enable ms_bind_ipv6 in addition
to passing the list of MON IPs in brackets.

Change-Id: I3644b8fc06458e68574afa5573f07442f0a09190

environments/network-isolation-v6.yaml
puppet/ceph-cluster-config.yaml
puppet/extraconfig/ceph/ceph-external-config.yaml
puppet/manifests/overcloud_cephstorage.pp
puppet/manifests/overcloud_compute.pp
puppet/manifests/overcloud_controller.pp
puppet/manifests/overcloud_controller_pacemaker.pp

index 4c07174..599a08b 100644 (file)
@@ -43,6 +43,8 @@ resource_registry:
   OS::TripleO::BlockStorage::Ports::StorageMgmtPort: ../network/ports/storage_mgmt_v6.yaml
 
 parameter_defaults:
+  # Enable IPv6 for Ceph.
+  CephIPv6: True
   # 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.
index 96198c3..dc2f98e 100644 (file)
@@ -39,6 +39,9 @@ parameters:
   CephClientUserName:
     default: openstack
     type: string
+  CephIPv6:
+    default: False
+    type: boolean
 
 resources:
   CephClusterConfigImpl:
@@ -50,15 +53,25 @@ resources:
           datafiles:
             ceph_cluster:
               mapped_data:
+                ceph_ipv6: {get_param: CephIPv6}
                 ceph_storage_count: {get_param: ceph_storage_count}
                 ceph_mon_initial_members:
                   list_join:
                   - ','
                   - {get_param: ceph_mon_names}
-                ceph::profile::params::mon_host:
+                ceph_mon_host:
                   list_join:
                   - ','
                   - {get_param: ceph_mon_ips}
+                ceph_mon_host_v6:
+                  str_replace:
+                    template: "'[IPS_LIST]'"
+                    params:
+                      IPS_LIST:
+                        list_join:
+                        - '],['
+                        - {get_param: ceph_mon_ips}
+                ceph::profile::params::ms_bind_ipv6: {get_param: CephIPv6}
                 ceph::profile::params::fsid: {get_param: ceph_fsid}
                 ceph::profile::params::mon_key: {get_param: ceph_mon_key}
                 # We should use a separated key for the non-admin clients
index ebd6c25..312d49a 100644 (file)
@@ -41,6 +41,9 @@ parameters:
   CephClientUserName:
     default: openstack
     type: string
+  CephIPv6:
+    default: False
+    type: boolean
 
 resources:
   CephClusterConfigImpl:
@@ -54,7 +57,9 @@ resources:
               mapped_data:
                 ceph_storage_count: {get_param: ceph_storage_count}
                 enable_external_ceph: true
-                ceph::profile::params::mon_host: {get_param: ceph_external_mon_ips}
+                ceph_ipv6: {get_param: CephIPv6}
+                ceph_mon_host: {get_param: ceph_external_mon_ips}
+                ceph_mon_host_v6: {get_param: ceph_external_mon_ips}
                 ceph::profile::params::fsid: {get_param: ceph_fsid}
                 ceph::profile::params::client_keys:
                   str_replace:
@@ -72,6 +77,7 @@ resources:
                       NOVA_POOL: {get_param: NovaRbdPoolName}
                       CINDER_POOL: {get_param: CinderRbdPoolName}
                       GLANCE_POOL: {get_param: GlanceRbdPoolName}
+                ceph::profile::params::ms_bind_ipv6: {get_param: CephIPv6}
                 nova::compute::rbd::libvirt_images_rbd_pool: {get_param: NovaRbdPoolName}
                 cinder_rbd_pool_name: {get_param: CinderRbdPoolName}
                 glance::backend::rbd::rbd_store_pool: {get_param: GlanceRbdPoolName}
index 0db5b45..fd7faff 100644 (file)
@@ -40,6 +40,14 @@ if str2bool(hiera('ceph_osd_selinux_permissive', true)) {
   } -> Class['ceph::profile::osd']
 }
 
+if str2bool(hiera('ceph_ipv6', false)) {
+  $mon_host = hiera('ceph_mon_host_v6')
+} else {
+  $mon_host = hiera('ceph_mon_host')
+}
+class { '::ceph::profile::params':
+  mon_host            => $mon_host,
+}
 include ::ceph::conf
 include ::ceph::profile::client
 include ::ceph::profile::osd
index c5762be..7c8cda7 100644 (file)
@@ -62,6 +62,14 @@ nova_config {
 $rbd_ephemeral_storage = hiera('nova::compute::rbd::ephemeral_storage', false)
 $rbd_persistent_storage = hiera('rbd_persistent_storage', false)
 if $rbd_ephemeral_storage or $rbd_persistent_storage {
+  if str2bool(hiera('ceph_ipv6', false)) {
+    $mon_host = hiera('ceph_mon_host_v6')
+  } else {
+    $mon_host = hiera('ceph_mon_host')
+  }
+  class { '::ceph::profile::params':
+    mon_host            => $mon_host,
+  }
   include ::ceph::conf
   include ::ceph::profile::client
 
index 4d22b96..4a03fef 100644 (file)
@@ -161,8 +161,15 @@ if hiera('step') >= 2 {
   $enable_ceph = hiera('ceph_storage_count', 0) > 0 or hiera('enable_ceph_storage', false)
 
   if $enable_ceph {
+    $mon_initial_members = downcase(hiera('ceph_mon_initial_members'))
+    if str2bool(hiera('ceph_ipv6', false)) {
+      $mon_host = hiera('ceph_mon_host_v6')
+    } else {
+      $mon_host = hiera('ceph_mon_host')
+    }
     class { '::ceph::profile::params':
-      mon_initial_members => downcase(hiera('ceph_mon_initial_members')),
+      mon_initial_members => $mon_initial_members,
+      mon_host            => $mon_host,
     }
     include ::ceph::conf
     include ::ceph::profile::mon
@@ -188,6 +195,14 @@ if hiera('step') >= 2 {
   }
 
   if str2bool(hiera('enable_external_ceph', false)) {
+    if str2bool(hiera('ceph_ipv6', false)) {
+      $mon_host = hiera('ceph_mon_host_v6')
+    } else {
+      $mon_host = hiera('ceph_mon_host')
+    }
+    class { '::ceph::profile::params':
+      mon_host            => $mon_host,
+    }
     include ::ceph::conf
     include ::ceph::profile::client
   }
index 06b66f4..7637029 100644 (file)
@@ -537,8 +537,15 @@ MYSQL_HOST=localhost\n",
   $enable_ceph = hiera('ceph_storage_count', 0) > 0 or hiera('enable_ceph_storage', false)
 
   if $enable_ceph {
+    $mon_initial_members = downcase(hiera('ceph_mon_initial_members'))
+    if str2bool(hiera('ceph_ipv6', false)) {
+      $mon_host = hiera('ceph_mon_host_v6')
+    } else {
+      $mon_host = hiera('ceph_mon_host')
+    }
     class { '::ceph::profile::params':
-      mon_initial_members => downcase(hiera('ceph_mon_initial_members')),
+      mon_initial_members => $mon_initial_members,
+      mon_host            => $mon_host,
     }
     include ::ceph::conf
     include ::ceph::profile::mon
@@ -564,6 +571,14 @@ MYSQL_HOST=localhost\n",
   }
 
   if str2bool(hiera('enable_external_ceph', false)) {
+    if str2bool(hiera('ceph_ipv6', false)) {
+      $mon_host = hiera('ceph_mon_host_v6')
+    } else {
+      $mon_host = hiera('ceph_mon_host')
+    }
+    class { '::ceph::profile::params':
+      mon_host            => $mon_host,
+    }
     include ::ceph::conf
     include ::ceph::profile::client
   }