Support the deployment of Ceph over IPv6

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
This commit is contained in:
Giulio Fidente 2016-01-25 13:05:57 +01:00 committed by Attila Darazs
parent dfb70bd5b3
commit 99cdabc403
7 changed files with 71 additions and 4 deletions

View 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.

View 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

View 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}

View 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

View 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

View 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
}

View 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
}