소스 검색

Fix preupgrade authorization objects are in sync minor versions

Currently, we check that upgrade target is less than 3.8,
but this will break for minor upgrades.

This commit set's a fact early in the upgrade process to
deterime what the currently installed version on the
first master is.

This fact is used to determine if our currently installed
version is less than 3.7.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1508301
Michael Gugino 7 년 전
부모
커밋
8a94529e34
2개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 0
      playbooks/common/openshift-cluster/upgrades/init.yml
  2. 1 1
      playbooks/common/openshift-cluster/upgrades/v3_7/validator.yml

+ 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