Change the check method for the ceph ods version

Previously, the ceph version was checked with "ceph -v".
However, this way is only check for the ceph client version.
So I change the way to check the ceph osd version.

Change-Id: I11f44186f671594e6e9e848f3fddb1d23b994b36
This commit is contained in:
Seungkyu Ahn 2018-01-25 17:27:53 +09:00 committed by Pete Birley
parent 47d7486172
commit d361c8f303
5 changed files with 10 additions and 10 deletions

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}