Browse Source

Merge "Stop using handlers for ovs"

tags/1.7.0
Zuul 1 month ago
committed by Gerrit Code Review
parent
commit
906b09ee37
4 changed files with 23 additions and 9 deletions
  1. +7
    -4
      tripleo_ansible/roles/tripleo_packages/molecule/upgrade/prepare.yml
  2. +0
    -2
      tripleo_ansible/roles/tripleo_packages/tasks/openvswitch.yml
  3. +7
    -1
      tripleo_ansible/roles/tripleo_packages/tasks/update.yml
  4. +9
    -2
      tripleo_ansible/roles/tripleo_packages/tasks/upgrade.yml

+ 7
- 4
tripleo_ansible/roles/tripleo_packages/molecule/upgrade/prepare.yml 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

tripleo_ansible/roles/tripleo_packages/handlers/main.yml → tripleo_ansible/roles/tripleo_packages/tasks/openvswitch.yml 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

+ 7
- 1
tripleo_ansible/roles/tripleo_packages/tasks/update.yml 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

+ 9
- 2
tripleo_ansible/roles/tripleo_packages/tasks/upgrade.yml 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:


Loading…
Cancel
Save