From d58bdb151af848ded8f7af4d6f31bd1a668c65b7 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Sat, 20 May 2023 11:51:22 +0200 Subject: [PATCH] Ensure OVN is restarted on package update Change-Id: I851a81d47e2ab985213f711ccd81a6870f42317b Needed-By: https://review.opendev.org/c/openstack/openstack-ansible/+/879890 --- handlers/main.yml | 15 ++++++++++++++- tasks/neutron_install.yml | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/handlers/main.yml b/handlers/main.yml index 949dc5a5..b5656c67 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -141,7 +141,20 @@ state: started # (NOTE) Restarting twice to cleanup some pid. -- name: restart ovn service +- name: Restart ovn northd service: name: "{{ neutron_ovn_northd_service_name }}" state: restarted + when: + - neutron_services['neutron-ovn-northd']['group'] in group_names and neutron_plugin_type == 'ml2.ovn' + listen: + - restart ovn service + +- name: Restart ovn controller + service: + name: "{{ neutron_ovn_controller_service_name }}" + state: restarted + when: + - neutron_services['neutron-ovn-controller']['group'] in group_names and neutron_plugin_type == 'ml2.ovn' + listen: + - restart ovn service diff --git a/tasks/neutron_install.yml b/tasks/neutron_install.yml index ca9a3541..7a69b062 100644 --- a/tasks/neutron_install.yml +++ b/tasks/neutron_install.yml @@ -39,6 +39,7 @@ notify: - "Restart neutron services" - "Restart provider services" + - "restart ovn service" - name: Remove known problem packages package: