Ceph: fix logic for check ceph version

The logic for check ceph version in some charts has a code that doesn't
work. This patch check ceph version properly.

Change-Id: Ie97a3ec5ac5078f556f59a09db820ee574c60f50
This commit is contained in:
Jaesang Lee 2018-01-17 14:54:15 +09:00 committed by Pete Birley
parent 2d2e10bfb7
commit 96610abac1
5 changed files with 5 additions and 5 deletions

View File

@ -313,7 +313,7 @@ bootstrap:
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} -ne 0 ]]; then
if [[ ${test_luminous} -eq 0 ]]; then
ceph osd pool application enable $1 $3
fi
}

View File

@ -35,7 +35,7 @@ elif [ "x$STORAGE_BACKEND" == "xcinder.backup.drivers.ceph" ]; then
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} -ne 0 ]]; then
if [[ ${test_luminous} -eq 0 ]]; then
ceph osd pool application enable $1 $3
fi
}

View File

@ -32,7 +32,7 @@ if [ "x$STORAGE_BACKEND" == "xcinder.volume.drivers.rbd.RBDDriver" ]; then
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} -ne 0 ]]; then
if [[ ${test_luminous} -eq 0 ]]; then
ceph osd pool application enable $1 $3
fi
}

View File

@ -34,7 +34,7 @@ elif [ "x$STORAGE_BACKEND" == "xrbd" ]; then
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} -ne 0 ]]; then
if [[ ${test_luminous} -eq 0 ]]; then
ceph osd pool application enable $1 $3
fi
}

View File

@ -29,7 +29,7 @@ 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} -ne 0 ]]; then
if [[ ${test_luminous} -eq 0 ]]; then
ceph osd pool application enable $1 $3
fi
}