[ceph-client] update helm tests logic for pg autoscaler
This is to update helm tests logic depends on pg autoscaler enabled or not. Change-Id: I14e86c9f14260bff10f098caaa96709550372ee3
This commit is contained in:
parent
6201e6b1e5
commit
1a0ca47b51
@ -158,9 +158,15 @@ function pool_validation() {
|
||||
crush_rule=$(echo ${pool_obj} | jq -r .crush_rule)
|
||||
name=$(echo ${pool_obj} | jq -r .pool_name)
|
||||
pg_autoscale_mode=$(echo ${pool_obj} | jq -r .pg_autoscale_mode)
|
||||
if [[ "${ENABLE_AUTOSCALER}" == "true" ]]; then
|
||||
if [[ "${pg_autoscale_mode}" != "on" ]]; then
|
||||
echo "pg autoscaler not enabled on ${name} pool"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if [[ $(ceph tell mon.* version | egrep -q "nautilus"; echo $?) -eq 0 ]]; then
|
||||
if [ "x${size}" != "x${RBD}" ] || [ "x${min_size}" != "x${EXPECTED_POOLMINSIZE}" ] \
|
||||
|| [ "${pg_autoscale_mode}" != "on" ] || [ "x${crush_rule}" != "x${expectedCrushRuleId}" ]; then
|
||||
|| [ "x${crush_rule}" != "x${expectedCrushRuleId}" ]; then
|
||||
echo "Pool ${name} has incorrect parameters!!! Size=${size}, Min_Size=${min_size}, Rule=${crush_rule}, PG_Autoscale_Mode=${pg_autoscale_mode}"
|
||||
exit 1
|
||||
else
|
||||
|
@ -51,6 +51,8 @@ spec:
|
||||
value: {{ .Values.conf.pool.default.crush_rule | default "replicated_rule" | quote }}
|
||||
- name: MGR_COUNT
|
||||
value: {{ .Values.pod.replicas.mgr | default "1" | quote }}
|
||||
- name: ENABLE_AUTOSCALER
|
||||
value: {{ .Values.conf.features.pg_autoscaler | quote }}
|
||||
{{- range $pool := .Values.conf.pool.spec -}}
|
||||
{{- with $pool }}
|
||||
- name: {{ .name | upper | replace "." "_" }}
|
||||
|
Loading…
Reference in New Issue
Block a user