diff --git a/ceph/values.yaml b/ceph/values.yaml index 64d9500091..6e60c9c288 100644 --- a/ceph/values.yaml +++ b/ceph/values.yaml @@ -314,8 +314,8 @@ bootstrap: ceph -s function ensure_pool () { ceph osd pool stats $1 || ceph osd pool create $1 $2 - local test_luminous=$(ceph -v | egrep -q "12.2|luminous"; echo $?) - if [[ ${test_luminous} -eq 0 ]]; then + local test_luminous=$(ceph tell osd.* version | egrep -c "12.2|luminous") + if [[ ${test_luminous} -gt 0 ]]; then ceph osd pool application enable $1 $3 fi } diff --git a/cinder/templates/bin/_backup-storage-init.sh.tpl b/cinder/templates/bin/_backup-storage-init.sh.tpl index 239aa8c650..3d8214b542 100644 --- a/cinder/templates/bin/_backup-storage-init.sh.tpl +++ b/cinder/templates/bin/_backup-storage-init.sh.tpl @@ -34,8 +34,8 @@ 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 - local test_luminous=$(ceph -v | egrep -q "12.2|luminous"; echo $?) - if [[ ${test_luminous} -eq 0 ]]; then + local test_luminous=$(ceph tell osd.* version | egrep -c "12.2|luminous") + if [[ ${test_luminous} -gt 0 ]]; then ceph osd pool application enable $1 $3 fi } diff --git a/cinder/templates/bin/_storage-init.sh.tpl b/cinder/templates/bin/_storage-init.sh.tpl index 1a4b11c2a3..76a4de46bb 100644 --- a/cinder/templates/bin/_storage-init.sh.tpl +++ b/cinder/templates/bin/_storage-init.sh.tpl @@ -31,8 +31,8 @@ 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 - local test_luminous=$(ceph -v | egrep -q "12.2|luminous"; echo $?) - if [[ ${test_luminous} -eq 0 ]]; then + local test_luminous=$(ceph tell osd.* version | egrep -c "12.2|luminous") + if [[ ${test_luminous} -gt 0 ]]; then ceph osd pool application enable $1 $3 fi } diff --git a/glance/templates/bin/_storage-init.sh.tpl b/glance/templates/bin/_storage-init.sh.tpl index ea57b49e47..a4a0609040 100644 --- a/glance/templates/bin/_storage-init.sh.tpl +++ b/glance/templates/bin/_storage-init.sh.tpl @@ -33,8 +33,8 @@ elif [ "x$STORAGE_BACKEND" == "xrbd" ]; then ceph -s function ensure_pool () { ceph osd pool stats $1 || ceph osd pool create $1 $2 - local test_luminous=$(ceph -v | egrep -q "12.2|luminous"; echo $?) - if [[ ${test_luminous} -eq 0 ]]; then + local test_luminous=$(ceph tell osd.* version | egrep -c "12.2|luminous") + if [[ ${test_luminous} -gt 0 ]]; then ceph osd pool application enable $1 $3 fi } diff --git a/gnocchi/templates/bin/_storage-init.sh.tpl b/gnocchi/templates/bin/_storage-init.sh.tpl index e25eb0c172..6eb9f72bf7 100644 --- a/gnocchi/templates/bin/_storage-init.sh.tpl +++ b/gnocchi/templates/bin/_storage-init.sh.tpl @@ -28,8 +28,8 @@ set -ex ceph -s function ensure_pool () { ceph osd pool stats $1 || ceph osd pool create $1 $2 - local test_luminous=$(ceph -v | egrep -q "12.2|luminous"; echo $?) - if [[ ${test_luminous} -eq 0 ]]; then + local test_luminous=$(ceph tell osd.* version | egrep -c "12.2|luminous") + if [[ ${test_luminous} -gt 0 ]]; then ceph osd pool application enable $1 $3 fi }