Stop using handlers for ovs

Move openvswitch handler tasks to the update and upgrade tasks.

Related-Bug: #1888853
Change-Id: I98bb188d6157326e41765fa3f77dcb47480c408b
This commit is contained in:
Alex Schultz 2020-07-31 14:22:52 -06:00
parent 768e33e12b
commit dc7cf609ff
4 changed files with 23 additions and 9 deletions

View File

@ -17,7 +17,10 @@
- name: Prepare
hosts: all
roles:
- role: test_deps
test_deps_extra_packages:
- openvswitch
tasks:
- include_role:
name: test_deps
vars:
test_deps_setup_tripleo: true
test_deps_extra_packages:
- openvswitch

View File

@ -26,7 +26,6 @@
changed_when: false
failed_when: false
register: openvswitch_service_state
listen: start openvswitch
- name: Ensure openvswitch is running
systemd:
@ -37,4 +36,3 @@
- (openvswitch_service_state.status is defined) and
(((openvswitch_service_state.status['LoadState'] | lower) != 'not-found') and
((openvswitch_service_state.status['SubState'] | lower) != 'running'))
listen: start openvswitch

View File

@ -38,4 +38,10 @@
name: '*'
state: latest
exclude: ansible
notify: start openvswitch
register: tripleo_package_update_result
- name: Handle openvswitch service
include_tasks: openvswitch.yml
when:
- step|int == 3
- tripleo_package_update_result.changed

View File

@ -215,7 +215,7 @@
package:
name: rhosp-openvswitch
state: latest
notify: start openvswitch
register: tripleo_package_openvswitch_result
- name: set flag to skip other upgrade steps since OpenvSwitch is already upgraded!
set_fact:
@ -280,7 +280,14 @@
args:
chdir: /root/OVS_UPGRADE
loop: "{{ ovs_list_of_rpms.stdout_lines }}"
notify: "start openvswitch"
register: tripleo_package_openvswitch_result
- name: Start openvswitch
include_tasks: openvswitch.yml
when:
- (step|int) == 2
- tripleo_package_openvswitch_result is defined
- tripleo_package_openvswitch_result.changed
- name: Install libibverbs (https://bugs.launchpad.net/tripleo/+bug/1817743)
when: