Skip to content

Commit

Permalink
salt: Fix invalid check in downgrade precheck
Browse files Browse the repository at this point in the history
In 41a3583 we added a check to allow `saltenv` to be superior or equal
to higher node version but we did the oposite.
It's fix now in this commit

Fixes: #2551
  • Loading branch information
TeddyAndrieux committed May 20, 2020
1 parent c339ec1 commit d8d1214
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion salt/metalk8s/orchestrate/downgrade/precheck.sls
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{%- set nodes_versions = pillar.metalk8s.nodes.values() | map(attribute='version') | list %}
{%- do nodes_versions.sort(cmp=salt.pkg.version_cmp, reverse=True) %}
{%- set expected = nodes_versions | first %}
{%- if salt.pkg.version_cmp(saltenv | replace('metalk8s-', ''), expected) >= 0 %}
{%- if salt.pkg.version_cmp(saltenv | replace('metalk8s-', ''), expected) < 0 %}

Invalid saltenv "{{ saltenv }}" consider using "metalk8s-{{ expected }}":
test.fail_without_changes
Expand Down

0 comments on commit d8d1214

Please sign in to comment.