diff options
author | Brenton Leanhardt <bleanhar@redhat.com> | 2016-03-02 10:35:34 -0500 |
---|---|---|
committer | Brenton Leanhardt <bleanhar@redhat.com> | 2016-03-03 14:27:57 -0500 |
commit | 78068f9d8f5d70e702d19f7bd023a5e7d2194950 (patch) | |
tree | 1d6f38a96989a77bef4ec55fbb7604d025e08749 /playbooks/common | |
parent | 7d561bd252a4ddc9e204f31144fbed7fecd99bff (diff) | |
download | openshift-78068f9d8f5d70e702d19f7bd023a5e7d2194950.tar.gz openshift-78068f9d8f5d70e702d19f7bd023a5e7d2194950.tar.bz2 openshift-78068f9d8f5d70e702d19f7bd023a5e7d2194950.tar.xz openshift-78068f9d8f5d70e702d19f7bd023a5e7d2194950.zip |
Adding verify_upgrade_version variable for upgrade debugging
Diffstat (limited to 'playbooks/common')
3 files changed, 34 insertions, 3 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/containerized_upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/containerized_upgrade.yml index 3687beb36..696994688 100644 --- a/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/containerized_upgrade.yml +++ b/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/containerized_upgrade.yml @@ -1,2 +1,9 @@ - name: Update system_units script: ../files/ensure_system_units_have_version.sh {{ openshift.common.service_type }} {{ openshift.common.deployment_type }} {{ g_new_version }} + +- name: Verifying the correct version was configured + command: grep {{ verify_upgrade_version }} {{ item }} + with_items: + - /etc/sysconfig/openvswitch + - /etc/sysconfig/{{ openshift.common.service_type }}* + when: verify_upgrade_version is defined 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 64d8597a5..343cc0851 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 @@ -71,6 +71,10 @@ g_new_version: "{{ g_aos_versions.curr_version.split('-', 1).0 if g_aos_versions.avail_version is none else g_aos_versions.avail_version.split('-', 1).0 }}" when: openshift_pkg_version is not defined + - fail: + msg: Verifying the correct version was found + when: verify_upgrade_version is defined and g_new_version != verify_upgrade_version + - set_fact: g_new_version: "{{ openshift_pkg_version | replace('-','') }}" when: openshift_pkg_version is defined @@ -79,8 +83,14 @@ script: ../files/ensure_system_units_have_version.sh {{ openshift.common.service_type }} {{ openshift.common.deployment_type }} {{ g_aos_versions.curr_version }} when: openshift.common.is_containerized | bool - # TODO: Remove this, used for testing - #- pause: + # Note: the version number is hardcoded here in hopes of catching potential + # bugs in how g_aos_versions.curr_version is set + - name: Verifying the correct version is installed for upgrade + shell: grep 3.1.1.6 {{ item }} + with_items: + - /etc/sysconfig/openvswitch + - /etc/sysconfig/{{ openshift.common.service_type }}* + when: verify_upgrade_version is defined - fail: msg: This playbook requires Origin 1.1 or later @@ -100,8 +110,18 @@ register: g_docker_version_result when: not openshift.common.is_atomic | bool + - name: Determine available Docker + shell: "rpm -q --queryformat '---\ncurr_version: %{VERSION}\navail_version: \n' docker" + register: g_atomic_docker_version_result + when: openshift.common.is_atomic | bool + - set_fact: g_docker_version: "{{ g_docker_version_result.stdout | from_yaml }}" + when: not openshift.common.is_atomic | bool + + - set_fact: + g_docker_version: "{{ g_atomic_docker_version_result.stdout | from_yaml }}" + when: openshift.common.is_atomic | bool - fail: msg: This playbook requires access to Docker 1.9 or later diff --git a/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/upgrade.yml index 9e6696eb2..1f58a1e3f 100644 --- a/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/upgrade.yml +++ b/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/upgrade.yml @@ -9,7 +9,7 @@ ############################################################################### # Upgrade Masters ############################################################################### -- name: Upgrade master container +- name: Upgrade master hosts: oo_masters_to_config tasks: - include: rpm_upgrade.yml component=master @@ -101,6 +101,10 @@ ent_reconcile_bindings: true openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}" tasks: + - name: Verifying the correct commandline tools are available + shell: grep {{ verify_upgrade_version }} {{ openshift.common.admin_binary}} + when: openshift.common.is_containerized | bool and verify_upgrade_version is defined + - name: Reconcile Cluster Roles command: > {{ openshift.common.admin_binary}} --config={{ openshift.common.config_base }}/master/admin.kubeconfig |