aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGowrishankar Muthukrishnan <gmuthukr@redhat.com>2019-10-17 12:58:56 +0530
committerGowrishankar Muthukrishnan <gmuthukr@redhat.com>2020-01-21 12:00:02 +0530
commit1c6145f0da28c370575882793f2809e72b338f5a (patch)
treea47eaccdc36e4b2fcebd4cc9abf7a6620d52de4c
parent112928f5f07df7595aae5adc207ac8108bd90183 (diff)
downloadkolla-1c6145f0da28c370575882793f2809e72b338f5a.tar.gz
kolla-1c6145f0da28c370575882793f2809e72b338f5a.zip
Provision building netcontrold container
Netcontrold container service[1] is used to load balance PMD threads in OpenVSwitch for the dataplane traffic. This patch enables building netcontrold container for Openstack. [1] https://github.com/netcontrold/netcontrold-py Change-Id: I09cb42323d36fcff49da81fc2356c9f83400d5d6 Signed-off-by: Gowrishankar Muthukrishnan <gmuthukr@redhat.com>
-rw-r--r--docker/openvswitch/openvswitch-netcontrold/Dockerfile.j238
-rw-r--r--docker/openvswitch/openvswitch-netcontrold/extend_start.sh7
-rwxr-xr-xkolla/image/build.py1
-rw-r--r--releasenotes/notes/netcontrold-24c9d6602f84e819.yaml3
4 files changed, 49 insertions, 0 deletions
diff --git a/docker/openvswitch/openvswitch-netcontrold/Dockerfile.j2 b/docker/openvswitch/openvswitch-netcontrold/Dockerfile.j2
new file mode 100644
index 000000000..197c46a9e
--- /dev/null
+++ b/docker/openvswitch/openvswitch-netcontrold/Dockerfile.j2
@@ -0,0 +1,38 @@
+FROM {{ namespace }}/{{ image_prefix }}openvswitch-base:{{ tag }}
+LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
+
+{% block openvswitch_netcontrold_header %}{% endblock %}
+
+{% import "macros.j2" as macros with context %}
+
+{% if install_type == 'binary' %}
+
+RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
+ && /bin/false
+
+{% elif install_type == 'source' %}
+
+{% block openvswitch_netcontrold_install %}
+
+{% set openvswitch_netcontrold_packages = [
+ 'python3-pip',
+ ] %}
+
+{{ macros.install_packages(openvswitch_netcontrold_packages | customizable("packages")) }}
+
+{% set openvswitch_netcontrold_pip_packages = [
+ 'netcontrold',
+ ]
+%}
+
+RUN {{ macros.install_pip(openvswitch_netcontrold_pip_packages | customizable("pip_packages"), constraints = false, pip_version = "pip3") }}
+
+{% endblock %}
+
+{% endif %}
+
+COPY extend_start.sh /usr/local/bin/kolla_openvswitch_extend_start
+RUN chmod 755 /usr/local/bin/kolla_openvswitch_extend_start
+
+{% block openvswitch_netcontrold_footer %}{% endblock %}
+{% block footer %}{% endblock %}
diff --git a/docker/openvswitch/openvswitch-netcontrold/extend_start.sh b/docker/openvswitch/openvswitch-netcontrold/extend_start.sh
new file mode 100644
index 000000000..716cb126c
--- /dev/null
+++ b/docker/openvswitch/openvswitch-netcontrold/extend_start.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+if [[ ! -d "/var/log/kolla/openvswitch/netcontrold" ]]; then
+ mkdir -p /var/log/kolla/openvswitch/netcontrold
+fi
+if [[ $(stat -c %a /var/log/kolla/openvswitch/netcontrold) != "755" ]]; then
+ chmod 755 /var/log/kolla/openvswitch/netcontrold
+fi
diff --git a/kolla/image/build.py b/kolla/image/build.py
index 8b514d1b0..25ff28c35 100755
--- a/kolla/image/build.py
+++ b/kolla/image/build.py
@@ -119,6 +119,7 @@ UNBUILDABLE_IMAGES = {
"monasca-base",
"monasca-thresh",
"nova-mksproxy",
+ "openvswitch-netcontrold",
"qinling-base",
"searchlight-base",
"solum-base",
diff --git a/releasenotes/notes/netcontrold-24c9d6602f84e819.yaml b/releasenotes/notes/netcontrold-24c9d6602f84e819.yaml
new file mode 100644
index 000000000..a4f9e6b6b
--- /dev/null
+++ b/releasenotes/notes/netcontrold-24c9d6602f84e819.yaml
@@ -0,0 +1,3 @@
+---
+features:
+ - Adds possibility to run netcontrold image for openvswitch service.