summaryrefslogtreecommitdiffstats
path: root/roles/openshift_version/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_version/tasks')
-rw-r--r--roles/openshift_version/tasks/first_master.yml22
-rw-r--r--roles/openshift_version/tasks/first_master_rpm_version.yml4
-rw-r--r--roles/openshift_version/tasks/masters_and_nodes.yml2
3 files changed, 21 insertions, 7 deletions
diff --git a/roles/openshift_version/tasks/first_master.yml b/roles/openshift_version/tasks/first_master.yml
index 374725086..022ac30fc 100644
--- a/roles/openshift_version/tasks/first_master.yml
+++ b/roles/openshift_version/tasks/first_master.yml
@@ -13,18 +13,30 @@
- include_tasks: "{{ l_first_master_version_task_file }}"
+# When double upgrade is in process, we want to set everything to match
+# openshift_verison.
- block:
- debug:
msg: "openshift_pkg_version was not defined. Falling back to -{{ openshift_version }}"
- set_fact:
- openshift_pkg_version: -{{ openshift_version }}
+ openshift_pkg_version: "-{{ openshift_version }}"
when:
- - openshift_pkg_version is not defined
- - openshift_upgrade_target is not defined
+ - openshift_pkg_version is not defined or l_double_upgrade_cp_reset_version
+# When double upgrade is in process, we want to set everything to match
+# openshift_verison.
- block:
- debug:
msg: "openshift_image_tag was not defined. Falling back to v{{ openshift_version }}"
- set_fact:
- openshift_image_tag: v{{ openshift_version }}
- when: openshift_image_tag is not defined
+ openshift_image_tag: "v{{ openshift_version }}"
+ when: openshift_image_tag is not defined or l_double_upgrade_cp_reset_version
+
+# 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
+
+- debug: var=openshift_version
diff --git a/roles/openshift_version/tasks/first_master_rpm_version.yml b/roles/openshift_version/tasks/first_master_rpm_version.yml
index 264baca65..9a5f0c568 100644
--- a/roles/openshift_version/tasks/first_master_rpm_version.yml
+++ b/roles/openshift_version/tasks/first_master_rpm_version.yml
@@ -11,6 +11,8 @@
- name: Set openshift_version for rpm installation
include_tasks: check_available_rpms.yml
+# If double upgrade is in process, we want to set openshift_version to whatever
+# rpm package is available.
- set_fact:
openshift_version: "{{ rpm_results.results.versions.available_versions.0 }}"
- when: openshift_version is not defined
+ when: openshift_version is not defined or l_double_upgrade_cp_reset_version
diff --git a/roles/openshift_version/tasks/masters_and_nodes.yml b/roles/openshift_version/tasks/masters_and_nodes.yml
index fbeb22d8b..c4dbc2a5f 100644
--- a/roles/openshift_version/tasks/masters_and_nodes.yml
+++ b/roles/openshift_version/tasks/masters_and_nodes.yml
@@ -6,7 +6,7 @@
include_tasks: check_available_rpms.yml
- name: Fail if rpm version and docker image version are different
fail:
- msg: "OCP rpm version {{ openshift_rpm_version }} is different from OCP image version {{ openshift_version }}"
+ msg: "OCP rpm version {{ rpm_results.results.versions.available_versions.0 }} is different from OCP image version {{ openshift_version }}"
# Both versions have the same string representation
when: rpm_results.results.versions.available_versions.0 != openshift_version
# block when