Merge "Bypass openvswitch update logic if expected packages are not present" into stable/train

This commit is contained in:
Zuul 2020-01-22 01:32:42 +00:00 committed by Gerrit Code Review
commit d2fd7653a4
2 changed files with 24 additions and 16 deletions

View File

@ -218,8 +218,17 @@ outputs:
# change with every major upgrade so this special handling will # change with every major upgrade so this special handling will
# eventually replace the special handling of upgrading the # eventually replace the special handling of upgrading the
# openvswitch package "in place" # openvswitch package "in place"
- name: Get current OpenvSwitch package name
register: ovs_pkg_out
shell:
rpm -qa | awk -F- '/^(openvswitch[0-9]+\.[0-9]+-|openvswitch-2)/{print $1}'
- name: Don't update if not present
set_fact:
run_ovs_update: "{{ (ovs_pkg_out.stdout | length) > 0 }}"
- name: Block for gathering information for upgrading OpenvSwitch layered product packaging - name: Block for gathering information for upgrading OpenvSwitch layered product packaging
when: step|int == 2 when:
- step|int == 2
- run_ovs_update|bool
block: block:
- name: Process rhosp-openvswitch layered package for new version number - name: Process rhosp-openvswitch layered package for new version number
shell: | shell: |
@ -234,11 +243,6 @@ outputs:
set_fact: set_fact:
new_ovs_version: "{{ rhosp_package_result.stdout }}" new_ovs_version: "{{ rhosp_package_result.stdout }}"
when: ovs_lp_packaging|default(false) when: ovs_lp_packaging|default(false)
- name: Get current OpenvSwitch package name
register: ovs_pkg_out
shell:
rpm -qa | awk -F- '/^(openvswitch[0-9]+\.[0-9]+-|openvswitch-2)/{print $1}'
- name: Get version from current OpenvSwitch package - name: Get version from current OpenvSwitch package
register: ovs_version_out register: ovs_version_out
shell: shell:
@ -281,7 +285,7 @@ outputs:
- name: Check for openvswitch upgrade if not layered package installs - name: Check for openvswitch upgrade if not layered package installs
when: when:
- step|int == 2 - step|int == 2
- run_ovs_update|default(true) - run_ovs_update|bool
block: block:
- name: check if an upgrade is required - name: check if an upgrade is required
register: ovs_need_upgrade register: ovs_need_upgrade
@ -321,7 +325,7 @@ outputs:
- "{{ovs_list_of_rpms.stdout_lines}}" - "{{ovs_list_of_rpms.stdout_lines}}"
when: when:
- step|int == 2 - step|int == 2
- run_ovs_update|default(true) - run_ovs_update|bool
- ovs_packaging_issue|default(false)|succeeded - ovs_packaging_issue|default(false)|succeeded
- ovs_need_upgrade.stdout|default('') - ovs_need_upgrade.stdout|default('')
- name: Install libibverbs (https://bugs.launchpad.net/tripleo/+bug/1817743) - name: Install libibverbs (https://bugs.launchpad.net/tripleo/+bug/1817743)

View File

@ -72,8 +72,17 @@ outputs:
# change with every major upgrade so this special handling will # change with every major upgrade so this special handling will
# eventually replace the special handling of upgrading the # eventually replace the special handling of upgrading the
# openvswitch package "in place" # openvswitch package "in place"
- name: Get current OpenvSwitch package name
register: ovs_pkg_out
shell:
rpm -qa | awk -F- '/^(openvswitch[0-9]+\.[0-9]+-|openvswitch-2)/{print $1}'
- name: Don't update if not present
set_fact:
run_ovs_update: "{{ (ovs_pkg_out.stdout | length) > 0 }}"
- name: Block for gathering information for upgrading OpenvSwitch layered product packaging - name: Block for gathering information for upgrading OpenvSwitch layered product packaging
when: step|int == 2 when:
- step|int == 2
- run_ovs_update|bool
block: block:
- name: Process rhosp-openvswitch layered package for new version number - name: Process rhosp-openvswitch layered package for new version number
shell: | shell: |
@ -88,11 +97,6 @@ outputs:
set_fact: set_fact:
new_ovs_version: "{{ rhosp_package_result.stdout }}" new_ovs_version: "{{ rhosp_package_result.stdout }}"
when: ovs_lp_packaging|default(false) when: ovs_lp_packaging|default(false)
- name: Get current OpenvSwitch package name
register: ovs_pkg_out
shell:
rpm -qa | awk -F- '/^(openvswitch[0-9]+\.[0-9]+-|openvswitch-2)/{print $1}'
- name: Get version from current OpenvSwitch package - name: Get version from current OpenvSwitch package
register: ovs_version_out register: ovs_version_out
shell: shell:
@ -135,7 +139,7 @@ outputs:
- name: Check for openvswitch upgrade if not layered package installs - name: Check for openvswitch upgrade if not layered package installs
when: when:
- step|int == 2 - step|int == 2
- run_ovs_update|default(true) - run_ovs_update|bool
block: block:
- name: check if an upgrade is required - name: check if an upgrade is required
register: ovs_need_upgrade register: ovs_need_upgrade
@ -175,7 +179,7 @@ outputs:
- "{{ovs_list_of_rpms.stdout_lines}}" - "{{ovs_list_of_rpms.stdout_lines}}"
when: when:
- step|int == 2 - step|int == 2
- run_ovs_update|default(true) - run_ovs_update|bool
- ovs_packaging_issue|default(false)|succeeded - ovs_packaging_issue|default(false)|succeeded
- ovs_need_upgrade.stdout|default('') - ovs_need_upgrade.stdout|default('')
# The openvswitch package disables the systemd service on install. When installing # The openvswitch package disables the systemd service on install. When installing