summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2016-07-19 10:05:51 -0300
committerDevan Goodwin <dgoodwin@redhat.com>2016-07-19 16:16:02 -0300
commit37ce5323345c0241fe6cce8e48b7bd4cce119bb5 (patch)
tree2e433f31e2ac40413714d12ea8a40dbd4c171d6b
parentac4ef6bb65c24890592b6b35b11be82f4ddc6deb (diff)
downloadopenshift-37ce5323345c0241fe6cce8e48b7bd4cce119bb5.tar.gz
openshift-37ce5323345c0241fe6cce8e48b7bd4cce119bb5.tar.bz2
openshift-37ce5323345c0241fe6cce8e48b7bd4cce119bb5.tar.xz
openshift-37ce5323345c0241fe6cce8e48b7bd4cce119bb5.zip
Fix bugs with origin 1.2 rpm based upgrades.
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml8
-rw-r--r--roles/openshift_version/tasks/main.yml7
2 files changed, 13 insertions, 2 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml b/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml
index 7a8dfdf91..a27b62971 100644
--- a/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml
+++ b/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml
@@ -87,7 +87,7 @@
# Request openshift_release 3.2 and let the openshift_version role handle converting this
# to a more specific version, respecting openshift_image_tag and openshift_pkg_version if
# defined, and overriding the normal behavior of protecting the installed version
- openshift_release: "3.2"
+ openshift_release: "{{ '1.2' if deployment_type == 'origin' else '3.2' }}"
openshift_protect_installed_version: False
# Docker role (a dependency) should be told not to do anything to installed version
# of docker, we handle this separately during upgrade. (the inventory may have a
@@ -176,8 +176,12 @@
- name: Verify OpenShift 3.2 RPMs are available for upgrade
fail:
msg: "OpenShift {{ avail_openshift_version.stdout }} is available, but 3.2 or greater is required"
- when: not openshift.common.is_containerized | bool and not avail_openshift_version | skipped and avail_openshift_version.stdout | default('0.0', True) | version_compare('3.2', '<')
+ when: deployment_type != 'origin' and not openshift.common.is_containerized | bool and not avail_openshift_version | skipped and avail_openshift_version.stdout | default('0.0', True) | version_compare(openshift_release, '<')
+ - name: Verify Origin 1.2 RPMs are available for upgrade
+ fail:
+ msg: "OpenShift {{ avail_openshift_version.stdout }} is available, but 1.2 or greater is required"
+ when: deployment_type == 'origin' and not openshift.common.is_containerized | bool and not avail_openshift_version | skipped and avail_openshift_version.stdout | default('0.0', True) | version_compare(openshift_release, '<')
# TODO: Are these two grep checks necessary anymore?
# Note: the version number is hardcoded here in hopes of catching potential
diff --git a/roles/openshift_version/tasks/main.yml b/roles/openshift_version/tasks/main.yml
index 0a134f557..d07fd5fbc 100644
--- a/roles/openshift_version/tasks/main.yml
+++ b/roles/openshift_version/tasks/main.yml
@@ -78,3 +78,10 @@
- fail:
msg: "Detected openshift version {{ openshift_version }} does not match requested openshift_release {{ openshift_release }}. You may need to adjust your yum repositories or specify an exact openshift_pkg_version."
when: not is_containerized | bool and openshift_release is defined and not openshift_version.startswith(openshift_release) | bool
+
+# The end result of these three variables is quite important so make sure they are displayed and logged:
+- debug: var=openshift_release
+
+- debug: var=openshift_image_tag
+
+- debug: var=openshift_pkg_version