aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ansible/group_vars/all.yml2
-rw-r--r--ansible/roles/neutron/defaults/main.yml4
-rw-r--r--ansible/roles/neutron/tasks/start.yml49
-rw-r--r--ansible/roles/neutron/templates/neutron.conf.j28
-rw-r--r--docker/neutron/neutron-sfc-agent/Dockerfile.j2 (renamed from docker/neutron/neutron-networking-sfc-agent/Dockerfile.j2)10
-rw-r--r--docker/neutron/neutron-sfc-agent/extend_start.sh (renamed from docker/neutron/neutron-networking-sfc-agent/extend_start.sh)0
-rw-r--r--kolla/common/config.py2
-rw-r--r--releasenotes/notes/add-networking-sfc-62ae433ed7aa4e33.yaml5
-rw-r--r--tests/test_build.py6
9 files changed, 75 insertions, 11 deletions
diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml
index 8dccd00e4..9ad3576a2 100644
--- a/ansible/group_vars/all.yml
+++ b/ansible/group_vars/all.yml
@@ -110,7 +110,7 @@ tunnel_interface: "{{ network_interface }}"
bifrost_network_interface: "{{ network_interface }}"
-# Valid options are [ openvswitch, linuxbridge ]
+# Valid options are [ openvswitch, linuxbridge, sfc ]
neutron_plugin_agent: "openvswitch"
# The default ports used by each service.
diff --git a/ansible/roles/neutron/defaults/main.yml b/ansible/roles/neutron/defaults/main.yml
index 21ef9a49f..0de2a597f 100644
--- a/ansible/roles/neutron/defaults/main.yml
+++ b/ansible/roles/neutron/defaults/main.yml
@@ -36,6 +36,10 @@ neutron_openvswitch_agent_image: "{{ docker_registry ~ '/' if docker_registry el
neutron_openvswitch_agent_tag: "{{ openstack_release }}"
neutron_openvswitch_agent_image_full: "{{ neutron_openvswitch_agent_image }}:{{ neutron_openvswitch_agent_tag }}"
+neutron_sfc_agent_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-neutron-sfc-agent"
+neutron_sfc_agent_tag: "{{ openstack_release }}"
+neutron_sfc_agent_image_full: "{{ neutron_sfc_agent_image }}:{{ neutron_sfc_agent_tag }}"
+
neutron_server_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-neutron-server"
neutron_server_tag: "{{ openstack_release }}"
neutron_server_image_full: "{{ neutron_server_image }}:{{ neutron_server_tag }}"
diff --git a/ansible/roles/neutron/tasks/start.yml b/ansible/roles/neutron/tasks/start.yml
index df5765b16..2172bc5ce 100644
--- a/ansible/roles/neutron/tasks/start.yml
+++ b/ansible/roles/neutron/tasks/start.yml
@@ -109,6 +109,36 @@
)
- neutron_plugin_agent == "openvswitch"
+- name: Starting neutron-sfc-agent container
+ kolla_docker:
+ action: "start_container"
+ common_options: "{{ docker_common_options }}"
+ image: "{{ neutron_sfc_agent_image_full }}"
+ name: "neutron_sfc_agent"
+ privileged: True
+ volumes:
+ - "{{ node_config_directory }}/neutron-sfc-agent/:{{ container_config_directory }}/:ro"
+ - "/etc/localtime:/etc/localtime:ro"
+ - "/lib/modules:/lib/modules:ro"
+ - "/run:/run"
+ - "kolla_logs:/var/log/kolla/"
+ when:
+ - (
+ ( inventory_hostname in groups['compute']
+ or (enable_manila | bool and inventory_hostname in groups['manila-share'])
+ or inventory_hostname in groups['neutron-dhcp-agent']
+ or inventory_hostname in groups['neutron-l3-agent']
+ or inventory_hostname in groups['neutron-metadata-agent']
+ and not enable_nova_fake | bool
+ ) or
+ ( inventory_hostname in groups['neutron-dhcp-agent']
+ or inventory_hostname in groups['neutron-l3-agent']
+ or inventory_hostname in groups['neutron-metadata-agent']
+ and enable_nova_fake | bool
+ )
+ )
+ - neutron_plugin_agent == "sfc"
+
- name: Starting neutron-openvswitch-agent container for fake nova compute
kolla_docker:
action: "start_container"
@@ -128,6 +158,25 @@
- neutron_plugin_agent == "openvswitch"
- enable_nova_fake | bool
+- name: Starting neutron-sfc-agent container for fake nova compute
+ kolla_docker:
+ action: "start_container"
+ common_options: "{{ docker_common_options }}"
+ image: "{{ neutron_sfc_agent_image_full }}"
+ name: "neutron_sfc_agent_fake_{{ item }}"
+ privileged: True
+ volumes:
+ - "{{ node_config_directory }}/neutron-sfc-agent-fake-{{ item }}/:{{ container_config_directory }}/:ro"
+ - "/etc/localtime:/etc/localtime:ro"
+ - "/lib/modules:/lib/modules:ro"
+ - "/run:/run"
+ - "kolla_logs:/var/log/kolla/"
+ with_sequence: start=1 end={{ num_nova_fake_per_node }}
+ when:
+ - inventory_hostname in groups['compute']
+ - neutron_plugin_agent == "sfc"
+ - enable_nova_fake | bool
+
- name: Starting neutron-linuxbridge-agent container
kolla_docker:
action: "start_container"
diff --git a/ansible/roles/neutron/templates/neutron.conf.j2 b/ansible/roles/neutron/templates/neutron.conf.j2
index be930858b..557187e91 100644
--- a/ansible/roles/neutron/templates/neutron.conf.j2
+++ b/ansible/roles/neutron/templates/neutron.conf.j2
@@ -35,7 +35,7 @@ host = {{ ansible_hostname }}_{{ item }}
allow_overlapping_ips = true
core_plugin = ml2
-service_plugins = router{% if enable_neutron_lbaas | bool %},neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2{% endif %}{% if enable_neutron_qos | bool %},qos{% endif %}
+service_plugins = router{% if enable_neutron_lbaas | bool %},lbaas{% endif %}{% if enable_neutron_qos | bool %},qos{% endif %},{% if neutron_plugin_agent == "sfc" %}flow_classifier,sfc{% endif %}
{% if enable_neutron_agent_ha | bool %}
dhcp_agents_per_network = {{ dhcp_agents_per_network }}
@@ -102,3 +102,9 @@ topics = notifications
{% else %}
driver = noop
{% endif %}
+
+{% if neutron_plugin_agent == "sfc" %}
+[sfc]
+drivers = ovs
+[flowclassifier]
+{% endif %}
diff --git a/docker/neutron/neutron-networking-sfc-agent/Dockerfile.j2 b/docker/neutron/neutron-sfc-agent/Dockerfile.j2
index 1582ea9a7..2c30a2242 100644
--- a/docker/neutron/neutron-networking-sfc-agent/Dockerfile.j2
+++ b/docker/neutron/neutron-sfc-agent/Dockerfile.j2
@@ -10,10 +10,10 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
{% elif install_type == 'source' %}
-ADD neutron-networking-sfc-agent-archive /neutron-networking-sfc-agent-source
-RUN ln -s neutron-networking-sfc-agent-source/* neutron_networking-sfc-agent \
- && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /neutron_networking-sfc-agent \
- && cp /neutron_networking-sfc-agent/etc/neutron/rootwrap.d/* /etc/neutron/rootwrap.d \
+ADD neutron-sfc-agent-archive /neutron-sfc-agent-source
+RUN ln -s neutron-sfc-agent-source/* neutron-sfc-agent \
+ && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /neutron-sfc-agent \
+ && cp /neutron-sfc-agent/etc/neutron/rootwrap.d/* /etc/neutron/rootwrap.d \
&& sed -i 's|^exec_dirs.*|exec_dirs=/var/lib/kolla/venv/bin,/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin|g' /etc/neutron/rootwrap.conf
{% endif %}
@@ -21,7 +21,7 @@ RUN ln -s neutron-networking-sfc-agent-source/* neutron_networking-sfc-agent \
COPY extend_start.sh /usr/local/bin/kolla_neutron_extend_start
RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start
-{% block neutron_networking_sfc_agent_footer %}{% endblock %}
+{% block neutron_sfc_agent_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
diff --git a/docker/neutron/neutron-networking-sfc-agent/extend_start.sh b/docker/neutron/neutron-sfc-agent/extend_start.sh
index d721b4d7b..d721b4d7b 100644
--- a/docker/neutron/neutron-networking-sfc-agent/extend_start.sh
+++ b/docker/neutron/neutron-sfc-agent/extend_start.sh
diff --git a/kolla/common/config.py b/kolla/common/config.py
index b125f0001..64b9a771a 100644
--- a/kolla/common/config.py
+++ b/kolla/common/config.py
@@ -241,7 +241,7 @@ SOURCES = {
'type': 'url',
'location': ('http://tarballs.openstack.org/neutron-lbaas/'
'neutron-lbaas-master.tar.gz')},
- 'neutron-networking-sfc-agent': {
+ 'neutron-sfc-agent': {
'type': 'url',
'location': ('http://tarballs.openstack.org/networking-sfc/'
'networking-sfc-master.tar.gz')},
diff --git a/releasenotes/notes/add-networking-sfc-62ae433ed7aa4e33.yaml b/releasenotes/notes/add-networking-sfc-62ae433ed7aa4e33.yaml
new file mode 100644
index 000000000..b5e5073ba
--- /dev/null
+++ b/releasenotes/notes/add-networking-sfc-62ae433ed7aa4e33.yaml
@@ -0,0 +1,5 @@
+---
+features:
+ - Add neutron Service Function Chaining (sfc) support. Service Function
+ Chaining is a mechanism for overriding the basic destination based
+ forwarding that is typical of IP networks
diff --git a/tests/test_build.py b/tests/test_build.py
index 2c8fd9032..96e67e794 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -66,7 +66,7 @@ class BuildTest(object):
class BuildTestCentosBinary(BuildTest, base.BaseTestCase):
excluded_images = ["kuryr",
- "neutron-networking-sfc-agent",
+ "neutron-sfc-agent",
"senlin-base",
"vmtp",
"watcher-base",
@@ -94,7 +94,7 @@ class BuildTestUbuntuBinary(BuildTest, base.BaseTestCase):
# package, just add neutron-lbaas-agent into the exclude_image. Once they
# fix it, this should be reverted.
excluded_images = ["kuryr",
- "neutron-networking-sfc-agent",
+ "neutron-sfc-agent",
"neutron-lbaas-agent",
"senlin-base",
"vmtp",
@@ -121,7 +121,7 @@ class BuildTestUbuntuSource(BuildTest, base.BaseTestCase):
class BuildTestOracleLinuxBinary(BuildTest, base.BaseTestCase):
excluded_images = ["kuryr",
- "neutron-networking-sfc-agent",
+ "neutron-sfc-agent",
"senlin-base",
"vmtp",
"watcher-base",