Merge "ovn-migration: Stop ml2/ovs agents before installing OVN resources" into stable/ussuri
This commit is contained in:
commit
ca71998c3a
|
@ -25,6 +25,14 @@
|
||||||
tags:
|
tags:
|
||||||
- setup
|
- setup
|
||||||
|
|
||||||
|
|
||||||
|
- name: Stop ml2/ovs resources
|
||||||
|
hosts: ovn-controllers
|
||||||
|
roles:
|
||||||
|
- stop-agents
|
||||||
|
tags:
|
||||||
|
- migration
|
||||||
|
|
||||||
#
|
#
|
||||||
# TripleO / Director is executed to deploy ovn using "br-migration" for the
|
# TripleO / Director is executed to deploy ovn using "br-migration" for the
|
||||||
# dataplane, while br-int is left intact to avoid dataplane disruption.
|
# dataplane, while br-int is left intact to avoid dataplane disruption.
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
# defaults file for stop-agents
|
||||||
|
systemd_service_file_dir: /etc/systemd/system
|
|
@ -0,0 +1,21 @@
|
||||||
|
---
|
||||||
|
- name: "stop and disable {{ service.name }} services and healthchecks"
|
||||||
|
systemd:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: stopped
|
||||||
|
enabled: no
|
||||||
|
become: yes
|
||||||
|
loop:
|
||||||
|
- "{{ service.healthcheck_timer_file }}"
|
||||||
|
- "{{ service.healthcheck_service_file }}"
|
||||||
|
- "{{ service.service_file }}"
|
||||||
|
|
||||||
|
- name: delete ml2 ovs systemd service files
|
||||||
|
file:
|
||||||
|
path: "{{ systemd_service_file_dir }}/{{ item }}"
|
||||||
|
state: absent
|
||||||
|
loop:
|
||||||
|
- "{{ service.service_file }}"
|
||||||
|
- "{{ service.healthcheck_service_file }}"
|
||||||
|
- "{{ service.healthcheck_timer_file }}"
|
||||||
|
become: yes
|
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: populate service facts
|
||||||
|
service_facts:
|
||||||
|
|
||||||
|
- name: disable ml2 ovs services and healthchecks
|
||||||
|
include_tasks: cleanup.yml
|
||||||
|
loop: "{{ ml2_ovs_services }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: service
|
||||||
|
when: ansible_facts.services[service.service_file] is defined
|
||||||
|
|
||||||
|
- name: remove containers
|
||||||
|
become: yes
|
||||||
|
shell: |
|
||||||
|
for agent in $(podman ps -a --format {% raw %}"{{.ID}}"{% endraw %} --filter "name=(neutron_.*_agent|neutron_dhcp)"); do
|
||||||
|
echo "Cleaning up agent $agent"
|
||||||
|
podman rm -f $agent
|
||||||
|
done
|
|
@ -0,0 +1,19 @@
|
||||||
|
---
|
||||||
|
# vars file for stop-agents
|
||||||
|
ml2_ovs_services:
|
||||||
|
- name: dhcp
|
||||||
|
service_file: tripleo_neutron_dhcp.service
|
||||||
|
healthcheck_service_file: tripleo_neutron_dhcp_healthcheck.service
|
||||||
|
healthcheck_timer_file: tripleo_neutron_dhcp_healthcheck.timer
|
||||||
|
- name: l3
|
||||||
|
service_file: tripleo_neutron_l3_agent.service
|
||||||
|
healthcheck_service_file: tripleo_neutron_l3_agent_healthcheck.service
|
||||||
|
healthcheck_timer_file: tripleo_neutron_l3_agent_healthcheck.timer
|
||||||
|
- name: metadata
|
||||||
|
service_file: tripleo_neutron_metadata_agent.service
|
||||||
|
healthcheck_service_file: tripleo_neutron_metadata_agent_healthcheck.service
|
||||||
|
healthcheck_timer_file: tripleo_neutron_metadata_agent_healthcheck.timer
|
||||||
|
- name: ovs
|
||||||
|
service_file: tripleo_neutron_ovs_agent.service
|
||||||
|
healthcheck_service_file: tripleo_neutron_ovs_agent_healthcheck.service
|
||||||
|
healthcheck_timer_file: tripleo_neutron_ovs_agent_healthcheck.timer
|
Loading…
Reference in New Issue