valid config for number_of_replicas in allocate action includes 0

This commit is contained in:
reyesj2
2025-11-24 11:12:09 -06:00
parent 3339b50daf
commit cc8fb96047

View File

@@ -70,7 +70,7 @@
{% set PHASE = settings.policy.phases[P].actions %}
{# remove allocate action if number_of_replicas isn't configured #}
{% if PHASE.allocate is defined %}
{% if PHASE.allocate.number_of_replicas is defined and not PHASE.allocate.number_of_replicas %}
{% if PHASE.allocate.number_of_replicas is not defined or PHASE.allocate.number_of_replicas == "" %}
{% do PHASE.pop('allocate', none) %}
{% endif %}
{% endif %}