Support rbd pool replication and crush ruleset for glance

- pass new pool replication&crush ruleset parameter to the
  storage init script
- set images pool replication&crush ruleset in the storage init script

Change-Id: Idd883d4348a292c0de54c7ee47da98f11f36306f
Story: 2004921
Task: 29282
Signed-off-by: Irina Mihai <irina.mihai@windriver.com>
This commit is contained in:
Irina Mihai 2019-02-04 19:53:32 +00:00 committed by Chris Wedgwood
parent b93b16310f
commit 92b54f8352
3 changed files with 8 additions and 0 deletions

View File

@ -47,6 +47,8 @@ elif [ "x$STORAGE_BACKEND" == "xrbd" ]; then
if [[ ${test_version} -gt 0 ]]; then
ceph osd pool application enable "$1" "$3"
fi
ceph osd pool set "$1" size "${RBD_POOL_REPLICATION}"
ceph osd pool set "$1" crush_rule "${RBD_POOL_CRUSH_RULE}"
}
ensure_pool "${RBD_POOL_NAME}" "${RBD_POOL_CHUNK_SIZE}" "glance-image"

View File

@ -104,6 +104,10 @@ spec:
value: {{ .Values.conf.glance.glance_store.rbd_store_pool | quote }}
- name: RBD_POOL_USER
value: {{ .Values.conf.glance.glance_store.rbd_store_user | quote }}
- name: RBD_POOL_REPLICATION
value: {{ .Values.conf.glance.glance_store.rbd_store_replication | quote }}
- name: RBD_POOL_CRUSH_RULE
value: {{ .Values.conf.glance.glance_store.rbd_store_crush_rule | quote }}
- name: RBD_POOL_CHUNK_SIZE
value: {{ .Values.conf.glance.glance_store.rbd_store_chunk_size | quote }}
- name: RBD_POOL_SECRET

View File

@ -275,6 +275,8 @@ conf:
memcache_security_strategy: ENCRYPT
glance_store:
rbd_store_chunk_size: 8
rbd_store_replication: 3
rbd_store_crush_rule: replicated_rule
rbd_store_pool: glance.images
rbd_store_user: glance
rbd_store_ceph_conf: /etc/ceph/ceph.conf