From 1ee66d50b7ca6d77f5bc3718cb58f86c622b2125 Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Fri, 2 Sep 2016 11:21:11 -0300 Subject: Reunite upgrade reconciliation gating with the play it gates on. --- .../common/openshift-cluster/upgrades/upgrade.yml | 35 +++++++++++----------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/playbooks/common/openshift-cluster/upgrades/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/upgrade.yml index 8a2784fb4..c4ce5fef6 100644 --- a/playbooks/common/openshift-cluster/upgrades/upgrade.yml +++ b/playbooks/common/openshift-cluster/upgrades/upgrade.yml @@ -177,6 +177,24 @@ - set_fact: reconcile_complete: True +############################################################################## +# Gate on reconcile +############################################################################## +- name: Gate on reconcile + hosts: localhost + connection: local + become: no + tasks: + - set_fact: + reconcile_completed: "{{ hostvars + | oo_select_keys(groups.oo_masters_to_config) + | oo_collect('inventory_hostname', {'reconcile_complete': true}) }}" + - set_fact: + reconcile_failed: "{{ groups.oo_masters_to_config | difference(reconcile_completed) }}" + - fail: + msg: "Upgrade cannot continue. The following masters did not finish reconciling: {{ reconcile_failed | join(',') }}" + when: reconcile_failed | length > 0 + ############################################################################### # Upgrade Nodes ############################################################################### @@ -242,20 +260,3 @@ when: inventory_hostname in groups.oo_nodes_to_config and was_schedulable | bool -############################################################################## -# Gate on reconcile -############################################################################## -- name: Gate on reconcile - hosts: localhost - connection: local - become: no - tasks: - - set_fact: - reconcile_completed: "{{ hostvars - | oo_select_keys(groups.oo_masters_to_config) - | oo_collect('inventory_hostname', {'reconcile_complete': true}) }}" - - set_fact: - reconcile_failed: "{{ groups.oo_masters_to_config | difference(reconcile_completed) }}" - - fail: - msg: "Upgrade cannot continue. The following masters did not finish reconciling: {{ reconcile_failed | join(',') }}" - when: reconcile_failed | length > 0 -- cgit v1.2.3