Browse Source

Merge pull request #6063 from mgugino-upstream-stage/upgrade-minor-validator-fix

Fix preupgrade authorization objects are in sync minor versions
Scott Dodson 7 years ago
parent
commit
4c80a74d3c

+ 5 - 0
playbooks/common/openshift-cluster/upgrades/init.yml

@@ -9,7 +9,12 @@
 
 - name: Ensure firewall is not switched during upgrade
   hosts: oo_all_hosts
+  vars:
+    openshift_master_installed_version: "{{ hostvars[groups.oo_first_master.0].openshift.common.version }}"
   tasks:
+  - name: set currently installed version
+    set_fact:
+      openshift_currently_installed_version: "{{ openshift_master_installed_version }}"
   - name: Check if iptables is running
     command: systemctl status iptables
     changed_when: false

+ 1 - 1
playbooks/common/openshift-cluster/upgrades/v3_7/validator.yml

@@ -15,7 +15,7 @@
   - name: Confirm OpenShift authorization objects are in sync
     command: >
       {{ openshift.common.client_binary }} adm migrate authorization
-    when: openshift_upgrade_target | version_compare('3.8','<')
+    when: openshift_currently_installed_version | version_compare('3.7','<')
     changed_when: false
     register: l_oc_result
     until: l_oc_result.rc == 0