[CEPH] Fix the ceph pool creations for openstack services

This is to fix the ceph version checks for enabling the applications
on newly created pools for openstack services like cinder and glance.

Change-Id: I2c007f728180cf7753255463ebf2f8dc5dc6fa5b
This commit is contained in:
Chinasubbareddy Mallavarapu 2021-05-04 11:45:07 +00:00 committed by chinasubbareddy mallavarapu
parent 42cdcea972
commit 2002b9368d
7 changed files with 10 additions and 11 deletions

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0 appVersion: v1.0.0
description: OpenStack-Helm Cinder description: OpenStack-Helm Cinder
name: cinder name: cinder
version: 0.2.0 version: 0.2.1
home: https://docs.openstack.org/cinder/latest/ home: https://docs.openstack.org/cinder/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Cinder/OpenStack_Project_Cinder_vertical.png icon: https://www.openstack.org/themes/openstack/images/project-mascots/Cinder/OpenStack_Project_Cinder_vertical.png
sources: sources:

View File

@ -32,9 +32,8 @@ elif [[ $STORAGE_BACKEND =~ 'cinder.backup.drivers.ceph' ]]; then
ceph -s ceph -s
function ensure_pool () { function ensure_pool () {
ceph osd pool stats $1 || ceph osd pool create $1 $2 ceph osd pool stats $1 || ceph osd pool create $1 $2
local test_version=$(ceph tell osd.* version | egrep -c "nautilus|mimic|luminous" | xargs echo) if [[ $(ceph mgr versions | awk '/version/{print $3}' | cut -d. -f1) -ge 12 ]]; then
if [[ ${test_version} -gt 0 ]]; then ceph osd pool application enable $1 $3
ceph osd pool application enable $1 $3
fi fi
size_protection=$(ceph osd pool get $1 nosizechange | cut -f2 -d: | tr -d '[:space:]') 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 nosizechange 0

View File

@ -29,9 +29,8 @@ if [ "x$STORAGE_BACKEND" == "xcinder.volume.drivers.rbd.RBDDriver" ]; then
ceph -s ceph -s
function ensure_pool () { function ensure_pool () {
ceph osd pool stats $1 || ceph osd pool create $1 $2 ceph osd pool stats $1 || ceph osd pool create $1 $2
local test_version=$(ceph tell osd.* version | egrep -c "nautilus|mimic|luminous" | xargs echo) if [[ $(ceph mgr versions | awk '/version/{print $3}' | cut -d. -f1) -ge 12 ]]; then
if [[ ${test_version} -gt 0 ]]; then ceph osd pool application enable $1 $3
ceph osd pool application enable $1 $3
fi fi
size_protection=$(ceph osd pool get $1 nosizechange | cut -f2 -d: | tr -d '[:space:]') 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 nosizechange 0

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0 appVersion: v1.0.0
description: OpenStack-Helm Glance description: OpenStack-Helm Glance
name: glance name: glance
version: 0.2.0 version: 0.2.1
home: https://docs.openstack.org/glance/latest/ home: https://docs.openstack.org/glance/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Glance/OpenStack_Project_Glance_vertical.png icon: https://www.openstack.org/themes/openstack/images/project-mascots/Glance/OpenStack_Project_Glance_vertical.png
sources: sources:

View File

@ -46,9 +46,8 @@ elif [ "x$STORAGE_BACKEND" == "xrbd" ]; then
function ensure_pool () { function ensure_pool () {
ceph osd pool stats "$1" || ceph osd pool create "$1" "$2" ceph osd pool stats "$1" || ceph osd pool create "$1" "$2"
local test_version local test_version
test_version=$(ceph tell osd.* version | egrep -c "nautilus|mimic|luminous" | xargs echo) if [[ $(ceph mgr versions | awk '/version/{print $3}' | cut -d. -f1) -ge 12 ]]; then
if [[ ${test_version} -gt 0 ]]; then ceph osd pool application enable $1 $3
ceph osd pool application enable "$1" "$3"
fi fi
ceph osd pool set "$1" size "${RBD_POOL_REPLICATION}" ceph osd pool set "$1" size "${RBD_POOL_REPLICATION}"
ceph osd pool set "$1" crush_rule "${RBD_POOL_CRUSH_RULE}" ceph osd pool set "$1" crush_rule "${RBD_POOL_CRUSH_RULE}"

View File

@ -17,3 +17,4 @@ cinder:
- 0.1.14 Add Multipathd support for ISCSI backed volumes - 0.1.14 Add Multipathd support for ISCSI backed volumes
- 0.1.15 Fix the problem in hostNetwork mode - 0.1.15 Fix the problem in hostNetwork mode
- 0.2.0 Remove support for releases before T - 0.2.0 Remove support for releases before T
- 0.2.1 Fix the ceph pool creations for openstack services

View File

@ -10,3 +10,4 @@ glance:
- 0.1.7 Update storage init script with cacert - 0.1.7 Update storage init script with cacert
- 0.1.8 Update glance default policy values - 0.1.8 Update glance default policy values
- 0.2.0 Remove support for releases before T - 0.2.0 Remove support for releases before T
- 0.2.1 Fix the ceph pool creations for openstack services