Support cinder backups to specific ceph cluster

New CinderBackupRbdClusterName and CinderBackupRbdClientUserName
parameters support configuring the cinder-backup service to store
backups on an external ceph cluster defined by CephExternalMultiConfig.

The new parameters default to an empty string, in which case the default
CephClusterName and CephClientUserName values are used.

Change-Id: I0aa4108c029cbb9b8d88a5f87b1ea517bb54059e
This commit is contained in:
Alan Bishop 2021-04-14 12:35:03 -07:00
parent 52fe1cf70c
commit c6c513a96a
2 changed files with 35 additions and 6 deletions

View File

@ -56,6 +56,16 @@ parameters:
type: string
constraints:
- allowed_values: ['swift', 'ceph', 'nfs', 'gcs', 's3']
CinderBackupRbdClusterName:
type: string
default: ''
description: The Ceph cluster where backups are to be stored. If no value
is specified then the CephClusterName value is used.
CinderBackupRbdClientUserName:
default: ''
type: string
description: The Ceph client name used by the backup service. If no value
is specified then the CephClientUserName value is used.
CinderBackupRbdPoolName:
default: backups
type: string
@ -135,14 +145,25 @@ outputs:
- get_attr: [CinderBase, role_data, config_settings]
- if:
- {equals: [{get_param: CinderBackupBackend}, 'ceph']}
- cinder::backup::ceph::backup_ceph_user: {get_param: CephClientUserName}
- cinder::backup::ceph::backup_ceph_user:
str_replace:
template: USERNAME
params:
USERNAME:
if:
- {equals: [{get_param: CinderBackupRbdClientUserName}, '']}
- {get_param: CephClientUserName}
- {get_param: CinderBackupRbdClientUserName}
cinder::backup::ceph::backup_ceph_pool: {get_param: CinderBackupRbdPoolName}
cinder::backup::ceph::backup_ceph_conf:
list_join:
- ''
- - '/etc/ceph/'
str_replace:
template: /etc/ceph/CLUSTER.conf
params:
CLUSTER:
if:
- {equals: [{get_param: CinderBackupRbdClusterName}, '']}
- {get_param: CephClusterName}
- '.conf'
- {get_param: CinderBackupRbdClusterName}
- if:
- {equals: [{get_param: CinderBackupBackend}, 'swift']}
- cinder::backup::swift::backup_swift_container: volumebackups

View File

@ -0,0 +1,8 @@
---
features:
- |
The cinder-backup service can be configured to store backups on external
Ceph clusters defined by the ``CephExternalMultiConfig`` parameter. New
``CinderBackupRbdClusterName`` and ``CinderBackupRbdClientUserName``
parameters can be specified, which override the default ``CephClusterName``
and ``CephClientUserName`` values respectively.