Glance chart: add images pool replication

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

Change-Id: If0ecaeb12afd78caacdbb9b85cda8d6cfda00dea
Story: 2004520
Task: 29324
Depends-on: I120e196ec3acca1f57b717cc4548c7c549fac738
Signed-off-by: Irina Mihai <irina.mihai@windriver.com>
This commit is contained in:
Irina Mihai 2019-02-04 18:06:14 +00:00
parent cf67244052
commit aac168b398
3 changed files with 58 additions and 1 deletions

View File

@ -5,4 +5,4 @@ TAR="$TAR_NAME-$SHA.tar.gz"
COPY_LIST="${CGCS_BASE}/downloads/$TAR $PKG_BASE/files/* "
TIS_PATCH_VER=8
TIS_PATCH_VER=9

View File

@ -24,6 +24,7 @@ Patch03: 0003-Add-Panko-Chart.patch
Patch04: Remove-stale-Apache2-service-pids-when-a-POD-starts.patch
Patch05: 0005-Add-heat-purge-deleted-cron-job.patch
Patch06: 0006-Enable-cold-migration-in-nova-helm-chart.patch
Patch07: 0007-Glance-chart-add-images-pool-replication.patch
BuildRequires: helm
BuildRequires: openstack-helm-infra
@ -40,6 +41,7 @@ Openstack Helm charts
%patch04 -p1
%patch05 -p1
%patch06 -p1
%patch07 -p1
%build
# initialize helm and build the toolkit

View File

@ -0,0 +1,55 @@
From 5480584be125316f3ce325fd1d0e9b4022db5c69 Mon Sep 17 00:00:00 2001
From: Irina Mihai <irina.mihai@windriver.com>
Date: Fri, 1 Feb 2019 16:02:46 -0500
Subject: [PATCH] Add replication support for the images rbd pool
---
glance/templates/bin/_storage-init.sh.tpl | 2 ++
glance/templates/job-storage-init.yaml | 4 ++++
glance/values.yaml | 2 ++
3 files changed, 8 insertions(+)
diff --git a/glance/templates/bin/_storage-init.sh.tpl b/glance/templates/bin/_storage-init.sh.tpl
index 4082c52..e6bd188 100755
--- a/glance/templates/bin/_storage-init.sh.tpl
+++ b/glance/templates/bin/_storage-init.sh.tpl
@@ -47,6 +47,8 @@ elif [ "x$STORAGE_BACKEND" == "xrbd" ]; then
if [[ ${test_luminous} -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"
diff --git a/glance/templates/job-storage-init.yaml b/glance/templates/job-storage-init.yaml
index 9d95627..c0cd186 100755
--- a/glance/templates/job-storage-init.yaml
+++ b/glance/templates/job-storage-init.yaml
@@ -103,6 +103,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
diff --git a/glance/values.yaml b/glance/values.yaml
index 5ae9863..4d482d1 100755
--- a/glance/values.yaml
+++ b/glance/values.yaml
@@ -268,6 +268,8 @@ conf:
memcache_security_strategy: ENCRYPT
glance_store:
rbd_store_chunk_size: 8
+ rbd_store_replication: 1
+ rbd_store_crush_rule: replicated_rule
rbd_store_pool: glance.images
rbd_store_user: glance
rbd_store_ceph_conf: /etc/ceph/ceph.conf
--
2.7.4