Merge "Clear all l3 related namespace before starting neutron-l3-agent"

This commit is contained in:
Jenkins 2017-08-11 11:16:43 +00:00 committed by Gerrit Code Review
commit 89a55b4f44
6 changed files with 75 additions and 2 deletions

View File

@ -162,6 +162,7 @@
or neutron_l3_agent_ini | changed
or neutron_fwaas_driver_ini | changed
or policy_json | changed
or neutron_l3_agent_wrapper | changed
or neutron_l3_agent_container | changed
- name: Restart neutron-lbaas-agent container
@ -243,6 +244,7 @@
or neutron_fwaas_driver_ini | changed
or neutron_vpnaas_agent_ini | changed
or policy_json | changed
or neutron_vpnaas_agent_wrapper | changed
or neutron_vpnaas_agent_container | changed
- name: Restart neutron-bgp-dragent container

View File

@ -312,6 +312,34 @@
notify:
- "Restart {{ item.key }} container"
- name: Copy neutron-l3-agent-wrapper script
vars:
service_name: "neutron-l3-agent"
service: "{{ neutron_services[service_name] }}"
template:
src: neutron-l3-agent-wrapper.sh.j2
dest: "{{ node_config_directory }}/{{ service_name }}/neutron-l3-agent-wrapper.sh"
register: neutron_l3_agent_wrapper
when:
- service.enabled | bool
- service.host_in_groups | bool
notify:
- "Restart {{ service_name }} container"
- name: Copy neutron-vpnaas-agent-wrapper script
vars:
service_name: "neutron-vpnaas-agent"
service: "{{ neutron_services[service_name] }}"
template:
src: neutron-vpnaas-agent-wrapper.sh.j2
dest: "{{ node_config_directory }}/{{ service_name }}/neutron-vpnaas-agent-wrapper.sh"
register: neutron_vpnaas_agent_wrapper
when:
- service.enabled | bool
- service.host_in_groups | bool
notify:
- "Restart {{ service_name }} container"
# TODO check the environment change
- name: Check neutron containers
kolla_docker:

View File

@ -0,0 +1,15 @@
#!/bin/bash
set -o errexit
# NOTE(jeffrey4l): Remove all l3 related netns in case of multiple active routers in l3 high available mode.
neutron-netns-cleanup \
--config-file /etc/neutron/neutron.conf \
--config-file /etc/neutron/l3_agent.ini \
--config-file /etc/neutron/fwaas_driver.ini \
--force --agent-type l3
neutron-l3-agent \
--config-file /etc/neutron/neutron.conf \
--config-file /etc/neutron/l3_agent.ini \
--config-file /etc/neutron/fwaas_driver.ini

View File

@ -1,6 +1,12 @@
{
"command": "neutron-l3-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agent.ini --config-file /etc/neutron/fwaas_driver.ini",
"command": "/usr/local/bin/neutron-l3-agent-wrapper.sh",
"config_files": [
{
"source": "{{ container_config_directory }}/neutron-l3-agent-wrapper.sh",
"dest": "/usr/local/bin/neutron-l3-agent-wrapper.sh",
"owner": "root",
"perm": "0755"
},
{
"source": "{{ container_config_directory }}/neutron.conf",
"dest": "/etc/neutron/neutron.conf",

View File

@ -0,0 +1,16 @@
#!/bin/bash
set -o errexit
# NOTE(jeffrey4l): Remove all l3 related netns in case of multiple active routers in l3 high available mode.
neutron-netns-cleanup \
--config-file /etc/neutron/neutron.conf \
--config-file /etc/neutron/fwaas_driver.ini \
--config-file /etc/neutron/l3_agent.ini \
--force --agent-type l3
neutron-vpn-agent \
--config-file /etc/neutron/neutron.conf \
--config-file /etc/neutron/fwaas_driver.ini \
--config-file /etc/neutron/l3_agent.ini \
--config-file /etc/neutron/vpnaas_agent.ini

View File

@ -1,6 +1,12 @@
{
"command": "neutron-vpn-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/fwaas_driver.ini --config-file /etc/neutron/l3_agent.ini --config-file /etc/neutron/vpnaas_agent.ini",
"command": "/usr/local/bin/neutron-vpnaas-agent-wrapper.sh",
"config_files": [
{
"source": "{{ container_config_directory }}/neutron-vpnaas-agent-wrapper.sh",
"dest": "/usr/local/bin/neutron-vpnaas-agent-wrapper.sh",
"owner": "root",
"perm": "0755"
},
{
"source": "{{ container_config_directory }}/neutron.conf",
"dest": "/etc/neutron/neutron.conf",