Allow pool size change when pools are protected

Change-Id: I1ae4c0788288e3d05f009355fe0831259bbd969a
This commit is contained in:
Jean-Charles Lopez 2018-10-18 12:48:10 -07:00
parent b7c8ba6d81
commit 1e740816a7
2 changed files with 6 additions and 0 deletions

View File

@ -38,7 +38,10 @@ elif [ "x$STORAGE_BACKEND" == "xcinder.backup.drivers.ceph" ]; then
if [[ ${test_luminous} -gt 0 ]]; then
ceph osd pool application enable $1 $3
fi
size_protection=$(ceph osd pool get $1 nosizechange | cut -f2 -d: | tr -d '[:space:]')
ceph osd pool set $1 nosizechange 0
ceph osd pool set $1 size ${RBD_POOL_REPLICATION}
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"

View File

@ -35,7 +35,10 @@ if [ "x$STORAGE_BACKEND" == "xcinder.volume.drivers.rbd.RBDDriver" ]; then
if [[ ${test_luminous} -gt 0 ]]; then
ceph osd pool application enable $1 $3
fi
size_protection=$(ceph osd pool get $1 nosizechange | cut -f2 -d: | tr -d '[:space:]')
ceph osd pool set $1 nosizechange 0
ceph osd pool set $1 size ${RBD_POOL_REPLICATION}
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"