diff options
author | Jason DeTiberus <jdetiber@redhat.com> | 2015-12-02 13:06:55 -0500 |
---|---|---|
committer | Jason DeTiberus <jdetiber@redhat.com> | 2015-12-02 13:06:55 -0500 |
commit | fe9484a40c80de7ef93319dd842ce77b5b1eeef9 (patch) | |
tree | e385b0d0a305755551af2aa9788a135894585557 /playbooks/common | |
parent | eb7ddb27be3975d8dbd15d29b2c33b18a050c011 (diff) | |
download | openshift-fe9484a40c80de7ef93319dd842ce77b5b1eeef9.tar.gz openshift-fe9484a40c80de7ef93319dd842ce77b5b1eeef9.tar.bz2 openshift-fe9484a40c80de7ef93319dd842ce77b5b1eeef9.tar.xz openshift-fe9484a40c80de7ef93319dd842ce77b5b1eeef9.zip |
Improve 3.1/1.1 upgrade check
Diffstat (limited to 'playbooks/common')
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml index 00ebf4ce6..99008446d 100644 --- a/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml +++ b/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml @@ -27,6 +27,7 @@ hosts: oo_first_master vars: openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}" + target_version: "{{ '1.1' if deployment_type == 'origin' else '3.1' }}" gather_facts: no tasks: # Pacemaker is currently the only supported upgrade path for multiple masters @@ -43,8 +44,8 @@ - fail: msg: > openshift_pkg_version is {{ openshift_pkg_version }} which is not a - valid version for a 3.1 upgrade - when: openshift_pkg_version is defined and openshift_pkg_version.split('-',1).1 | version_compare('3.0.2.900','<') + valid version for a {{ target_version }} upgrade + when: openshift_pkg_version is defined and openshift_pkg_version.split('-',1).1 | version_compare(target_version ,'<') # If this script errors out ansible will show the default stdout/stderr # which contains details for the user: @@ -53,6 +54,8 @@ - name: Verify upgrade can proceed hosts: oo_masters_to_config:oo_nodes_to_config + vars: + target_version: "{{ '1.1' if deployment_type == 'origin' else '3.1' }}" tasks: - name: Clean yum cache command: yum clean all @@ -75,8 +78,8 @@ when: deployment_type == 'origin' and g_aos_versions.curr_version | version_compare('1.0.6','<') - fail: - msg: Atomic OpenShift 3.1 packages not found - when: g_aos_versions.curr_version | version_compare('3.0.2.900','<') and (g_aos_versions.avail_version is none or g_aos_versions.avail_version | version_compare('3.0.2.900','<')) + msg: Upgrade packages not found + when: (g_aos_versions.avail_version | default(g_aos_versions.curr_version, true) | version_compare(target_version, '<')) - set_fact: pre_upgrade_complete: True |