Add support for multiple Cinder RBD backends

Add new CinderRbdExtraPools Heat parameter, which specifies a list of
Ceph pools for use with RBD backends for Cinder. An extra Cinder RBD
backend driver is created for each pool in the list. This is in addition
to the standard RBD backend driver associated with the CinderRbdPoolName.
The new parameter is optional, and defaults to an empty list.

Adding this feature requires changes in two areas:
o The extra Cinder RBD backends get created via a new Puppet parameter
o The Ceph client key that permits access to specific Ceph pools is
  updated to allow client access to the extra RBD pools

Implements: blueprint multiple-cinder-rbd-backend
Depends-On: I3318b9eaef607d6992f9a8cb605817b6f76dd331
Change-Id: If410ed43b2cc70094a3274c1488833fcaae56cca
This commit is contained in:
Alan Bishop 2017-09-22 11:59:22 -04:00
parent a0991433fa
commit 5429754222
5 changed files with 83 additions and 25 deletions

View File

@ -79,6 +79,14 @@ parameters:
CinderRbdPoolName:
default: volumes
type: string
CinderRbdExtraPools:
default: []
description: >
List of extra Ceph pools for use with RBD backends for Cinder. An
extra Cinder RBD backend driver is created for each pool in the
list. This is in addition to the standard RBD backend driver
associated with the CinderRbdPoolName.
type: comma_delimited_list
CinderBackupRbdPoolName:
default: backups
type: string
@ -214,11 +222,14 @@ outputs:
rule_name: ""
for_each:
<%pool%>:
- {get_param: CinderRbdPoolName}
- {get_param: CinderBackupRbdPoolName}
- {get_param: NovaRbdPoolName}
- {get_param: GlanceRbdPoolName}
- {get_param: GnocchiRbdPoolName}
list_concat:
- - {get_param: CinderRbdPoolName}
- {get_param: CinderBackupRbdPoolName}
- {get_param: NovaRbdPoolName}
- {get_param: GlanceRbdPoolName}
- {get_param: GnocchiRbdPoolName}
# CinderRbdExtraPools is a list (do not indent further)
- {get_param: CinderRbdExtraPools}
- {get_param: CephPools}
openstack_keys: &openstack_keys
- name:
@ -230,13 +241,18 @@ outputs:
mon_cap: "allow r"
osd_cap:
str_replace:
template: "allow class-read object_prefix rbd_children, allow rwx pool=CINDER_POOL, allow rwx pool=CINDERBACKUP_POOL, allow rwx pool=NOVA_POOL, allow rwx pool=GLANCE_POOL, allow rwx pool=GNOCCHI_POOL"
params:
NOVA_POOL: {get_param: NovaRbdPoolName}
CINDER_POOL: {get_param: CinderRbdPoolName}
CINDERBACKUP_POOL: {get_param: CinderBackupRbdPoolName}
GLANCE_POOL: {get_param: GlanceRbdPoolName}
GNOCCHI_POOL: {get_param: GnocchiRbdPoolName}
template: 'allow class-read object_prefix rbd_children, allow rwx pool=CEPH_CLIENT_POOLS'
params:
CEPH_CLIENT_POOLS:
list_join:
- ', allow rwx pool='
- - {get_param: CinderRbdPoolName}
- {get_param: CinderBackupRbdPoolName}
- {get_param: NovaRbdPoolName}
- {get_param: GlanceRbdPoolName}
- {get_param: GnocchiRbdPoolName}
# CinderRbdExtraPools is a list (do not indent further)
- {get_param: CinderRbdExtraPools}
mode: "0644"
- name:
list_join:

View File

@ -23,6 +23,14 @@ parameters:
CinderRbdPoolName:
default: volumes
type: string
CinderRbdExtraPools:
default: []
description: >
List of extra Ceph pools for use with RBD backends for Cinder. An
extra Cinder RBD backend driver is created for each pool in the
list. This is in addition to the standard RBD backend driver
associated with the CinderRbdPoolName.
type: comma_delimited_list
CinderBackupRbdPoolName:
default: backups
type: string
@ -133,13 +141,18 @@ outputs:
cap_mon: 'allow r'
cap_osd:
str_replace:
template: 'allow class-read object_prefix rbd_children, allow rwx pool=CINDER_POOL, allow rwx pool=CINDERBACKUP_POOL, allow rwx pool=NOVA_POOL, allow rwx pool=GLANCE_POOL, allow rwx pool=GNOCCHI_POOL'
template: 'allow class-read object_prefix rbd_children, allow rwx pool=CEPH_CLIENT_POOLS'
params:
NOVA_POOL: {get_param: NovaRbdPoolName}
CINDER_POOL: {get_param: CinderRbdPoolName}
CINDERBACKUP_POOL: {get_param: CinderBackupRbdPoolName}
GLANCE_POOL: {get_param: GlanceRbdPoolName}
GNOCCHI_POOL: {get_param: GnocchiRbdPoolName}
CEPH_CLIENT_POOLS:
list_join:
- ', allow rwx pool='
- - {get_param: CinderRbdPoolName}
- {get_param: CinderBackupRbdPoolName}
- {get_param: NovaRbdPoolName}
- {get_param: GlanceRbdPoolName}
- {get_param: GnocchiRbdPoolName}
# CinderRbdExtraPools is a list (do not indent further)
- {get_param: CinderRbdExtraPools}
MANILA_CLIENT_KEY:
mode: '0644'
secret: {get_param: CephManilaClientKey}

View File

@ -40,6 +40,14 @@ parameters:
CinderRbdPoolName:
default: volumes
type: string
CinderRbdExtraPools:
default: []
description: >
List of extra Ceph pools for use with RBD backends for Cinder. An
extra Cinder RBD backend driver is created for each pool in the
list. This is in addition to the standard RBD backend driver
associated with the CinderRbdPoolName.
type: comma_delimited_list
ManilaCephFSDataPoolName:
default: manila_data
type: string
@ -119,13 +127,16 @@ outputs:
repeat:
for_each:
<%pool%>:
- {get_param: CinderRbdPoolName}
- {get_param: ManilaCephFSDataPoolName}
- {get_param: ManilaCephFSMetadataPoolName}
- {get_param: CinderBackupRbdPoolName}
- {get_param: NovaRbdPoolName}
- {get_param: GlanceRbdPoolName}
- {get_param: GnocchiRbdPoolName}
list_concat:
- - {get_param: CinderRbdPoolName}
- {get_param: ManilaCephFSDataPoolName}
- {get_param: ManilaCephFSMetadataPoolName}
- {get_param: CinderBackupRbdPoolName}
- {get_param: NovaRbdPoolName}
- {get_param: GlanceRbdPoolName}
- {get_param: GnocchiRbdPoolName}
# CinderRbdExtraPools is a list (do not indent further)
- {get_param: CinderRbdExtraPools}
template:
<%pool%>:
pg_num: "%{hiera('ceph::profile::params::osd_pool_default_pg_num')}"

View File

@ -57,6 +57,14 @@ parameters:
CinderRbdPoolName:
default: volumes
type: string
CinderRbdExtraPools:
default: []
description: >
List of extra Ceph pools for use with RBD backends for Cinder. An
extra Cinder RBD backend driver is created for each pool in the
list. This is in addition to the standard RBD backend driver
associated with the CinderRbdPoolName.
type: comma_delimited_list
CephClientUserName:
default: openstack
type: string
@ -130,6 +138,7 @@ outputs:
tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_helper: {get_param: CinderISCSIHelper}
tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_protocol: {get_param: CinderISCSIProtocol}
tripleo::profile::base::cinder::volume::rbd::cinder_rbd_pool_name: {get_param: CinderRbdPoolName}
tripleo::profile::base::cinder::volume::rbd::cinder_rbd_extra_pools: {get_param: CinderRbdExtraPools}
tripleo::profile::base::cinder::volume::rbd::cinder_rbd_user_name: {get_param: CephClientUserName}
tripleo.cinder_volume.firewall_rules:
'120 iscsi initiator':

View File

@ -0,0 +1,9 @@
---
features:
- |
Add new CinderRbdExtraPools Heat parameter, which specifies a list of
Ceph pools for use with RBD backends for Cinder. An extra Cinder RBD
backend driver is created for each pool in the list. This is in addition
to the standard RBD backend driver associated with the CinderRbdPoolName.
The new parameter is optional, and defaults to an empty list. All of the
pools are associated with a single Ceph cluster.