Add DVR support

Additional service neutron-l3-agent-compute was added
with a corresponding config file since agent mode should
differ on controllers and computes in a DVR env.
Metadata agent should be running on both controllers and
computes in a DVR env.

Change-Id: I62af129331773b1ae42530a0079937942952701b
This commit is contained in:
Oleg Bondarev 2017-01-30 08:45:52 +00:00
parent 60f43c2ea9
commit 082102ab71
7 changed files with 54 additions and 2 deletions

View File

@ -30,6 +30,7 @@ configs:
debug: false
plugin_agent: "openvswitch"
l3_ha: false
dvr: false
ovsdb:
interface: "native"
connection: "unix:/run/openvswitch/db.sock"

View File

@ -1,4 +1,4 @@
# l3_agent.ini
[DEFAULT]
agent_mode = legacy
agent_mode = {% if neutron.dvr %} dvr_snat {% else %} legacy {% endif %}
external_network_bridge =

View File

@ -0,0 +1,3 @@
# l3_agent_compute.ini
[DEFAULT]
agent_mode = dvr

View File

@ -52,6 +52,10 @@ tunnel_types = vxlan
l2_population = true
arp_responder = true
{% if neutron.dvr %}
enable_distributed_routing = true
{% endif %}
[ovs]
ovsdb_interface = {{ neutron.ovsdb.interface }}
ovsdb_connection = {{ neutron.ovsdb.connection }}

View File

@ -35,6 +35,10 @@ l3_ha = {{ neutron.l3_ha }}
# If it is set to 0 then the ha router will be scheduled on every L3 agent.
max_l3_agents_per_router=0
{% if neutron.dvr %}
# System-wide flag to determine the type of router that tenants can create. Only admin can override. (boolean value)
router_distributed = true
{% endif %}
{% if neutron.enable_lbaas %}
[service_providers]

View File

@ -0,0 +1,37 @@
dsl_version: 0.2.0
service:
name: neutron-l3-agent-compute
antiAffinity: local
hostNetwork: true
containers:
- name: neutron-l3-agent
image: neutron-l3-agent
privileged: true
volumes:
- name: ovs-socket
type: host
path: /run/openvswitch
- name: metadata-socket
type: host
path: /var/lib/neutron/ccp
daemon:
command: neutron-l3-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agent_compute.ini --config-file /etc/neutron/plugins/ml2/ml2_conf.ini
dependencies:
- rabbitmq
files:
- neutron.conf
- ml2-conf.ini
- l3-agent-compute.ini
files:
neutron.conf:
path: /etc/neutron/neutron.conf
content: neutron.conf.j2
perm: "0600"
ml2-conf.ini:
path: /etc/neutron/plugins/ml2/ml2_conf.ini
content: ml2_conf.ini.j2
perm: "0600"
l3-agent-compute.ini:
path: /etc/neutron/l3_agent_compute.ini
content: l3_agent_compute.ini.j2
perm: "0600"

View File

@ -1,6 +1,9 @@
dsl_version: 0.1.0
dsl_version: 0.2.0
service:
name: neutron-metadata-agent
# {% if neutron.dvr %}
antiAffinity: local
# {% endif %}
hostNetwork: true
containers:
- name: neutron-metadata-agent