cinder: allow configuring the rbd app name
Instead of hardcoding it, let us override it with custom values for normal volumes and backups Change-Id: I3abb343877abd0436c592a3371372f82ef581790
This commit is contained in:
parent
11d76bb083
commit
c38443de4c
@ -44,7 +44,7 @@ elif [ "x$STORAGE_BACKEND" == "xcinder.backup.drivers.ceph" ]; then
|
||||
ceph osd pool set $1 nosizechange ${size_protection}
|
||||
ceph osd pool set $1 crush_rule "${RBD_POOL_CRUSH_RULE}"
|
||||
}
|
||||
ensure_pool ${RBD_POOL_NAME} ${RBD_POOL_CHUNK_SIZE} "cinder-backup"
|
||||
ensure_pool ${RBD_POOL_NAME} ${RBD_POOL_CHUNK_SIZE} ${RBD_POOL_APP_NAME}
|
||||
|
||||
if USERINFO=$(ceph auth get client.${RBD_POOL_USER}); then
|
||||
echo "Cephx user client.${RBD_POOL_USER} already exists"
|
||||
|
@ -41,7 +41,7 @@ if [ "x$STORAGE_BACKEND" == "xcinder.volume.drivers.rbd.RBDDriver" ]; then
|
||||
ceph osd pool set $1 nosizechange ${size_protection}
|
||||
ceph osd pool set $1 crush_rule "${RBD_POOL_CRUSH_RULE}"
|
||||
}
|
||||
ensure_pool ${RBD_POOL_NAME} ${RBD_POOL_CHUNK_SIZE} "cinder-volume"
|
||||
ensure_pool ${RBD_POOL_NAME} ${RBD_POOL_CHUNK_SIZE} ${RBD_POOL_APP_NAME}
|
||||
|
||||
if USERINFO=$(ceph auth get client.${RBD_POOL_USER}); then
|
||||
echo "Cephx user client.${RBD_POOL_USER} already exist."
|
||||
|
@ -111,6 +111,8 @@ spec:
|
||||
{{- if eq .Values.conf.cinder.DEFAULT.backup_driver "cinder.backup.drivers.ceph" }}
|
||||
- name: RBD_POOL_NAME
|
||||
value: {{ .Values.conf.cinder.DEFAULT.backup_ceph_pool | quote }}
|
||||
- name: RBD_POOL_APP_NAME
|
||||
value: {{ .Values.conf.software.rbd.rbd_pool_app_name_backup | quote }}
|
||||
- name: RBD_POOL_USER
|
||||
value: {{ .Values.conf.cinder.DEFAULT.backup_ceph_user | quote }}
|
||||
- name: RBD_POOL_CRUSH_RULE
|
||||
|
@ -102,6 +102,8 @@ spec:
|
||||
value: {{ index (index .Values.conf.backends (include "cinder.utils.ceph_volume_section_name" $envAll)) "volume_driver" | quote }}
|
||||
- name: RBD_POOL_NAME
|
||||
value: {{ index (index .Values.conf.backends (include "cinder.utils.ceph_volume_section_name" $envAll)) "rbd_pool" | quote }}
|
||||
- name: RBD_POOL_APP_NAME
|
||||
value: {{ .Values.conf.software.rbd.rbd_pool_app_name | quote }}
|
||||
- name: RBD_POOL_USER
|
||||
value: {{ index (index .Values.conf.backends (include "cinder.utils.ceph_volume_section_name" $envAll)) "rbd_user" | quote }}
|
||||
- name: RBD_POOL_CRUSH_RULE
|
||||
|
@ -304,6 +304,10 @@ ceph_client:
|
||||
user_secret_name: pvc-ceph-client-key
|
||||
|
||||
conf:
|
||||
software:
|
||||
rbd:
|
||||
rbd_pool_app_name_backup: cinder-backup
|
||||
rbd_pool_app_name: cinder-volume
|
||||
paste:
|
||||
composite:osapi_volume:
|
||||
use: call:cinder.api:root_app_factory
|
||||
|
Loading…
Reference in New Issue
Block a user