diff options
author | Brenton Leanhardt <bleanhar@redhat.com> | 2016-01-07 16:25:09 -0500 |
---|---|---|
committer | Brenton Leanhardt <bleanhar@redhat.com> | 2016-01-07 16:25:09 -0500 |
commit | 8b1caf4a658ebd4b1ea53e3f95955cb912ee79ee (patch) | |
tree | 14aaebd989ece4f8c6b2aba06eb9488c9d915591 /playbooks/common/openshift-cluster/upgrades | |
parent | df8fa62d2df2b9da4d38b9a5892541275feb8362 (diff) | |
parent | fe9484a40c80de7ef93319dd842ce77b5b1eeef9 (diff) | |
download | openshift-8b1caf4a658ebd4b1ea53e3f95955cb912ee79ee.tar.gz openshift-8b1caf4a658ebd4b1ea53e3f95955cb912ee79ee.tar.bz2 openshift-8b1caf4a658ebd4b1ea53e3f95955cb912ee79ee.tar.xz openshift-8b1caf4a658ebd4b1ea53e3f95955cb912ee79ee.zip |
Merge pull request #1008 from detiber/upgradeVersionCheck
Improve 3.1/1.1 upgrade check
Diffstat (limited to 'playbooks/common/openshift-cluster/upgrades')
-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 1f9c6afd3..68df2153d 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 @@ -29,6 +29,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 @@ -45,8 +46,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: @@ -55,6 +56,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 package cache command: "{{ ansible_pkg_mgr }} clean all" @@ -77,8 +80,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 |