diff --git a/ceph/values.yaml b/ceph/values.yaml index 0d7cdf55ca..ad7332bdba 100644 --- a/ceph/values.yaml +++ b/ceph/values.yaml @@ -312,7 +312,10 @@ bootstrap: ceph -s function ensure_pool () { ceph osd pool stats $1 || ceph osd pool create $1 $2 - ceph osd pool application enable $1 $3 + local test_luminous=$(ceph -v | egrep -q "12.2|luminous"; echo $?) + if [[ ${test_luminous} -ne 0 ]]; then + ceph osd pool application enable $1 $3 + fi } #ensure_pool volumes 8 cinder diff --git a/cinder/templates/bin/_backup-storage-init.sh.tpl b/cinder/templates/bin/_backup-storage-init.sh.tpl index c5db2ed9cb..3121f560c6 100644 --- a/cinder/templates/bin/_backup-storage-init.sh.tpl +++ b/cinder/templates/bin/_backup-storage-init.sh.tpl @@ -34,7 +34,10 @@ elif [ "x$STORAGE_BACKEND" == "xcinder.backup.drivers.ceph" ]; then ceph -s function ensure_pool () { ceph osd pool stats $1 || ceph osd pool create $1 $2 - ceph osd pool application enable $1 $3 + local test_luminous=$(ceph -v | egrep -q "12.2|luminous"; echo $?) + if [[ ${test_luminous} -ne 0 ]]; then + ceph osd pool application enable $1 $3 + fi } ensure_pool ${RBD_POOL_NAME} ${RBD_POOL_CHUNK_SIZE} "cinder-backup" diff --git a/cinder/templates/bin/_storage-init.sh.tpl b/cinder/templates/bin/_storage-init.sh.tpl index 2d32249f6c..14b7c67feb 100644 --- a/cinder/templates/bin/_storage-init.sh.tpl +++ b/cinder/templates/bin/_storage-init.sh.tpl @@ -31,7 +31,10 @@ if [ "x$STORAGE_BACKEND" == "xcinder.volume.drivers.rbd.RBDDriver" ]; then ceph -s function ensure_pool () { ceph osd pool stats $1 || ceph osd pool create $1 $2 - ceph osd pool application enable $1 $3 + local test_luminous=$(ceph -v | egrep -q "12.2|luminous"; echo $?) + if [[ ${test_luminous} -ne 0 ]]; then + ceph osd pool application enable $1 $3 + fi } ensure_pool ${RBD_POOL_NAME} ${RBD_POOL_CHUNK_SIZE} "cinder-volume" diff --git a/glance/templates/bin/_storage-init.sh.tpl b/glance/templates/bin/_storage-init.sh.tpl index e02aebeaf5..80fe765573 100644 --- a/glance/templates/bin/_storage-init.sh.tpl +++ b/glance/templates/bin/_storage-init.sh.tpl @@ -33,7 +33,10 @@ elif [ "x$STORAGE_BACKEND" == "xrbd" ]; then ceph -s function ensure_pool () { ceph osd pool stats $1 || ceph osd pool create $1 $2 - ceph osd pool application enable $1 $3 + local test_luminous=$(ceph -v | egrep -q "12.2|luminous"; echo $?) + if [[ ${test_luminous} -ne 0 ]]; then + ceph osd pool application enable $1 $3 + fi } ensure_pool ${RBD_POOL_NAME} ${RBD_POOL_CHUNK_SIZE} "glance-image" diff --git a/gnocchi/templates/bin/_storage-init.sh.tpl b/gnocchi/templates/bin/_storage-init.sh.tpl index ec40b867c9..6c08db0db9 100644 --- a/gnocchi/templates/bin/_storage-init.sh.tpl +++ b/gnocchi/templates/bin/_storage-init.sh.tpl @@ -28,7 +28,10 @@ set -ex ceph -s function ensure_pool () { ceph osd pool stats $1 || ceph osd pool create $1 $2 - ceph osd pool application enable $1 $3 + local test_luminous=$(ceph -v | egrep -q "12.2|luminous"; echo $?) + if [[ ${test_luminous} -ne 0 ]]; then + ceph osd pool application enable $1 $3 + fi } ensure_pool ${RBD_POOL_NAME} ${RBD_POOL_CHUNK_SIZE} "gnocchi-metrics"