Ceph-Client: allow helm test to proceed with 80% of osds avialble
This is to adjust helm test logic to proceed the deployment if 80% of osds are up and running in the cluster . Change-Id: I128266fd374426f75928332690e275b7f0175318
This commit is contained in:
parent
24841d6dea
commit
961a58dada
@ -38,11 +38,16 @@ function check_osd_count() {
|
||||
num_osd=$(echo $osd_stat_output | jq .num_osds)
|
||||
num_in_osds=$(echo $osd_stat_output | jq .num_in_osds)
|
||||
num_up_osds=$(echo $osd_stat_output | jq .num_up_osds)
|
||||
|
||||
if [ "x${EXPECTED_OSDS}" == "x${num_osd}" ] && [ "x${EXPECTED_OSDS}" == "x${num_in_osds}" ] && [ "x${EXPECTED_OSDS}" == "x${num_up_osds}" ]; then
|
||||
echo "All OSDs (${EXPECTED_OSDS}) are in UP and IN status"
|
||||
if [ $EXPECTED_OSDS == 1 ]; then
|
||||
MIN_EXPECTED_OSDS=$EXPECTED_OSDS
|
||||
else
|
||||
echo "All expected OSDs (${EXPECTED_OSDS}) are NOT in UP and IN status. Cluster shows OSD count=${num_osd}, UP=${num_up_osds}, IN=${num_in_osds}"
|
||||
MIN_EXPECTED_OSDS=$(($EXPECTED_OSDS*$REQUIRED_PERCENT_OF_OSDS/100))
|
||||
fi
|
||||
|
||||
if [ "${num_osd}" -ge "${MIN_EXPECTED_OSDS}" ] && [ "${num_in_osds}" -ge "${MIN_EXPECTED_OSDS}" ] && [ "${num_up_osds}" -ge "${MIN_EXPECTED_OSDS}" ]; then
|
||||
echo "Required number of OSDs (${MIN_EXPECTED_OSDS}) are UP and IN status"
|
||||
else
|
||||
echo "Required number of OSDs (${MIN_EXPECTED_OSDS}) are NOT UP and IN status. Cluster shows OSD count=${num_osd}, UP=${num_up_osds}, IN=${num_in_osds}"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
@ -45,6 +45,8 @@ spec:
|
||||
value: {{ .Release.Namespace }}
|
||||
- name: EXPECTED_OSDS
|
||||
value: {{ .Values.conf.pool.target.osd | quote }}
|
||||
- name: REQUIRED_PERCENT_OF_OSDS
|
||||
value: {{ .Values.conf.pool.target.required_percent_of_osds | ceil | quote }}
|
||||
- name: EXPECTED_CRUSHRULE
|
||||
value: {{ .Values.conf.pool.default.crush_rule | default "replicated_rule" | quote }}
|
||||
- name: MGR_COUNT
|
||||
|
@ -218,6 +218,9 @@ conf:
|
||||
#NOTE(portdirect): arbitrarily we set the default number of expected OSD's to 5
|
||||
# to match the number of nodes in the OSH gate (used only for helm tests).
|
||||
osd: 5
|
||||
# This is just for helm tests to proceed the deployment if we have mentioned % of
|
||||
# osds are up and running.
|
||||
required_percent_of_osds: 80
|
||||
pg_per_osd: 100
|
||||
protected: true
|
||||
#NOTE(st053q): target quota should be set to the overall cluster full percentage
|
||||
|
Loading…
Reference in New Issue
Block a user