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:
parent
47d7486172
commit
d361c8f303
@ -314,8 +314,8 @@ bootstrap:
|
|||||||
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_luminous=$(ceph -v | egrep -q "12.2|luminous"; echo $?)
|
local test_luminous=$(ceph tell osd.* version | egrep -c "12.2|luminous")
|
||||||
if [[ ${test_luminous} -eq 0 ]]; then
|
if [[ ${test_luminous} -gt 0 ]]; then
|
||||||
ceph osd pool application enable $1 $3
|
ceph osd pool application enable $1 $3
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -34,8 +34,8 @@ elif [ "x$STORAGE_BACKEND" == "xcinder.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_luminous=$(ceph -v | egrep -q "12.2|luminous"; echo $?)
|
local test_luminous=$(ceph tell osd.* version | egrep -c "12.2|luminous")
|
||||||
if [[ ${test_luminous} -eq 0 ]]; then
|
if [[ ${test_luminous} -gt 0 ]]; then
|
||||||
ceph osd pool application enable $1 $3
|
ceph osd pool application enable $1 $3
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -31,8 +31,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_luminous=$(ceph -v | egrep -q "12.2|luminous"; echo $?)
|
local test_luminous=$(ceph tell osd.* version | egrep -c "12.2|luminous")
|
||||||
if [[ ${test_luminous} -eq 0 ]]; then
|
if [[ ${test_luminous} -gt 0 ]]; then
|
||||||
ceph osd pool application enable $1 $3
|
ceph osd pool application enable $1 $3
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -33,8 +33,8 @@ elif [ "x$STORAGE_BACKEND" == "xrbd" ]; 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_luminous=$(ceph -v | egrep -q "12.2|luminous"; echo $?)
|
local test_luminous=$(ceph tell osd.* version | egrep -c "12.2|luminous")
|
||||||
if [[ ${test_luminous} -eq 0 ]]; then
|
if [[ ${test_luminous} -gt 0 ]]; then
|
||||||
ceph osd pool application enable $1 $3
|
ceph osd pool application enable $1 $3
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -28,8 +28,8 @@ set -ex
|
|||||||
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_luminous=$(ceph -v | egrep -q "12.2|luminous"; echo $?)
|
local test_luminous=$(ceph tell osd.* version | egrep -c "12.2|luminous")
|
||||||
if [[ ${test_luminous} -eq 0 ]]; then
|
if [[ ${test_luminous} -gt 0 ]]; then
|
||||||
ceph osd pool application enable $1 $3
|
ceph osd pool application enable $1 $3
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user