[CEPH] check ceph version from daemon
This is to update scripts to check ceph version from daemon directly instead of client. Change-Id: I402365a45b8c2a92420c68689c97cb2e9f2d7c0e
This commit is contained in:
parent
b0ee644204
commit
6898fa7f9e
@ -157,7 +157,7 @@ function pool_validation() {
|
||||
pg_placement_num=$(echo ${pool_obj} | jq -r .pg_placement_num)
|
||||
crush_rule=$(echo ${pool_obj} | jq -r .crush_rule)
|
||||
name=$(echo ${pool_obj} | jq -r .pool_name)
|
||||
if [[ $(ceph -v | egrep -q "nautilus"; echo $?) -eq 0 ]]; then
|
||||
if [[ $(ceph tell mon.* version | egrep -q "nautilus"; echo $?) -eq 0 ]]; then
|
||||
pg_placement_num_target=$(echo ${pool_obj} | jq -r .pg_placement_num_target)
|
||||
if [ "x${size}" != "x${RBD}" ] || [ "x${min_size}" != "x${EXPECTED_POOLMINSIZE}" ] \
|
||||
|| [ "x${pg_num}" != "x${pg_placement_num_target}" ] || [ "x${crush_rule}" != "x${expectedCrushRuleId}" ]; then
|
||||
|
@ -54,7 +54,7 @@ for module in ${ENABLED_MODULES}; do
|
||||
option=${option/${module}_/}
|
||||
key=`echo $option | cut -d= -f1`
|
||||
value=`echo $option | cut -d= -f2`
|
||||
if [[ $(ceph -v | egrep -q "nautilus"; echo $?) -eq 0 ]]; then
|
||||
if [[ $(ceph tell mon.* version | egrep -q "nautilus"; echo $?) -eq 0 ]]; then
|
||||
ceph --cluster "${CLUSTER}" config set mgr mgr/$module/$key $value --force
|
||||
else
|
||||
ceph --cluster "${CLUSTER}" config set mgr mgr/$module/$key $value
|
||||
|
@ -35,7 +35,7 @@ function wait_for_inactive_pgs () {
|
||||
echo "#### Start: Checking for inactive pgs ####"
|
||||
|
||||
# Loop until all pgs are active
|
||||
if [[ $(ceph -v | egrep -q "nautilus"; echo $?) -eq 0 ]]; then
|
||||
if [[ $(ceph tell mon.* version | egrep -q "nautilus"; echo $?) -eq 0 ]]; then
|
||||
while [[ `ceph --cluster ${CLUSTER} pg ls | tail -n +2 | head -n -2 | grep -v "active+"` ]]
|
||||
do
|
||||
sleep 3
|
||||
@ -59,7 +59,7 @@ function create_crushrule () {
|
||||
}
|
||||
|
||||
# Set mons to use the msgr2 protocol on nautilus
|
||||
if [[ $(ceph -v | egrep -q "nautilus"; echo $?) -eq 0 ]]; then
|
||||
if [[ -z "$(ceph mon versions | grep ceph\ version | grep -v nautilus)" ]]; then
|
||||
ceph --cluster "${CLUSTER}" mon enable-msgr2
|
||||
fi
|
||||
|
||||
@ -157,7 +157,7 @@ reweight_osds
|
||||
{{ $targetQuota := .Values.conf.pool.target.quota | default 100 }}
|
||||
{{ $targetProtection := .Values.conf.pool.target.protected | default "false" | quote | lower }}
|
||||
cluster_capacity=0
|
||||
if [[ $(ceph -v | egrep -q "nautilus"; echo $?) -eq 0 ]]; then
|
||||
if [[ $(ceph tell osd.* version | egrep -q "nautilus"; echo $?) -eq 0 ]]; then
|
||||
cluster_capacity=$(ceph --cluster "${CLUSTER}" df | grep "TOTAL" | awk '{print $2 substr($3, 1, 1)}' | numfmt --from=iec)
|
||||
else
|
||||
cluster_capacity=$(ceph --cluster "${CLUSTER}" df | head -n3 | tail -n1 | awk '{print $1 substr($2, 1, 1)}' | numfmt --from=iec)
|
||||
|
Loading…
x
Reference in New Issue
Block a user