Browse Source

Merge "Support rbd pool replication and crush ruleset for glance"

Zuul 1 month ago
parent
commit
09b341885f

+ 2
- 0
glance/templates/bin/_storage-init.sh.tpl View File

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

+ 4
- 0
glance/templates/job-storage-init.yaml View File

@@ -104,6 +104,10 @@ spec:
104 104
               value: {{ .Values.conf.glance.glance_store.rbd_store_pool | quote }}
105 105
             - name: RBD_POOL_USER
106 106
               value: {{ .Values.conf.glance.glance_store.rbd_store_user | quote }}
107
+            - name: RBD_POOL_REPLICATION
108
+              value: {{ .Values.conf.glance.glance_store.rbd_store_replication | quote }}
109
+            - name: RBD_POOL_CRUSH_RULE
110
+              value: {{ .Values.conf.glance.glance_store.rbd_store_crush_rule | quote }}
107 111
             - name: RBD_POOL_CHUNK_SIZE
108 112
               value: {{ .Values.conf.glance.glance_store.rbd_store_chunk_size | quote }}
109 113
             - name: RBD_POOL_SECRET

+ 2
- 0
glance/values.yaml View File

@@ -275,6 +275,8 @@ conf:
275 275
       memcache_security_strategy: ENCRYPT
276 276
     glance_store:
277 277
       rbd_store_chunk_size: 8
278
+      rbd_store_replication: 3
279
+      rbd_store_crush_rule: replicated_rule
278 280
       rbd_store_pool: glance.images
279 281
       rbd_store_user: glance
280 282
       rbd_store_ceph_conf: /etc/ceph/ceph.conf

Loading…
Cancel
Save