Merge "[QUEENS ONLY] Don't check openvswitch service if no ovs package." into stable/queens

This commit is contained in:
Zuul 2020-08-06 23:34:13 +00:00 committed by Gerrit Code Review
commit 9d57f09bf2
1 changed files with 14 additions and 2 deletions

View File

@ -135,9 +135,13 @@ outputs:
register: ovs_pkg_out register: ovs_pkg_out
shell: shell:
rpm -qa | awk -F- '/^(openvswitch[0-9]+\.[0-9]+-[0-9]+\.[0-9]+\.[-0]+-|openvswitch-2)/{print $1}' rpm -qa | awk -F- '/^(openvswitch[0-9]+\.[0-9]+-[0-9]+\.[0-9]+\.[-0]+-|openvswitch-2)/{print $1}'
when:
- step|int == 2
- name: Don't update if not present - name: Don't update if not present
set_fact: set_fact:
run_ovs_update: "{{ (ovs_pkg_out.stdout | length) > 0 }}" run_ovs_update: "{{ (ovs_pkg_out.stdout | length) > 0 }}"
when:
- step|int == 2
- name: Block for gathering information for upgrading OpenvSwitch layered product packaging - name: Block for gathering information for upgrading OpenvSwitch layered product packaging
when: when:
- step|int == 2 - step|int == 2
@ -245,7 +249,9 @@ outputs:
# do anything to prevent the systemd service from being removed and it is not # do anything to prevent the systemd service from being removed and it is not
# re-enabled by default by the new package. # re-enabled by default by the new package.
- name: Always ensure the openvswitch service is enabled and running after upgrades - name: Always ensure the openvswitch service is enabled and running after upgrades
when: step|int == 2 when:
- step|int == 2
- run_ovs_update|bool
service: service:
name: openvswitch name: openvswitch
enabled: yes enabled: yes
@ -326,9 +332,13 @@ outputs:
register: ovs_pkg_out register: ovs_pkg_out
shell: shell:
rpm -qa | awk -F- '/^(openvswitch[0-9]+\.[0-9]+-[0-9]+\.[0-9]+\.[-0]+-|openvswitch-2)/{print $1}' rpm -qa | awk -F- '/^(openvswitch[0-9]+\.[0-9]+-[0-9]+\.[0-9]+\.[-0]+-|openvswitch-2)/{print $1}'
when:
- step|int == 2 or step|int == 3
- name: Don't update if not present - name: Don't update if not present
set_fact: set_fact:
run_ovs_update: "{{ (ovs_pkg_out.stdout | length) > 0 }}" run_ovs_update: "{{ (ovs_pkg_out.stdout | length) > 0 }}"
when:
- step|int == 2 or step|int == 3
- name: Block for gathering information for upgrading OpenvSwitch layered product packaging - name: Block for gathering information for upgrading OpenvSwitch layered product packaging
when: when:
- step|int == 2 - step|int == 2
@ -415,7 +425,9 @@ outputs:
update_cache: yes update_cache: yes
# This is failsafe unless openvswitch package does something to the systemd service state. # This is failsafe unless openvswitch package does something to the systemd service state.
- name: Ensure openvswitch is running after update - name: Ensure openvswitch is running after update
when: step|int == 3 when:
- step|int == 3
- run_ovs_update|bool
service: service:
name: openvswitch name: openvswitch
enabled: yes enabled: yes