aboutsummaryrefslogtreecommitdiff
path: root/docker/openvswitch
diff options
context:
space:
mode:
authorHui Kang <kangh@us.ibm.com>2016-06-26 23:45:33 -0400
committerHui Kang <kangh@us.ibm.com>2016-06-26 23:45:33 -0400
commit54919dc4984121fcbc1de8f4f7ace00c37981a35 (patch)
tree315347dc4dbda8f4174b2d80d3ebe26d543be40c /docker/openvswitch
parentd87b4f63a2a4bd7017a94677e5310051689bb03d (diff)
downloadkolla-54919dc4984121fcbc1de8f4f7ace00c37981a35.tar.gz
kolla-54919dc4984121fcbc1de8f4f7ace00c37981a35.zip
Enable openvswitch container logs in host volumes
Allow heka container to pick up the openvswitch logs like other services Change-Id: I396ae9419540070c6ab01b8f62607ab46b1f08aa closes-Bug: #1573199
Diffstat (limited to 'docker/openvswitch')
-rw-r--r--docker/openvswitch/openvswitch-base/Dockerfile.j25
-rw-r--r--docker/openvswitch/openvswitch-base/extend_start.sh10
-rw-r--r--docker/openvswitch/openvswitch-db-server/Dockerfile.j24
-rw-r--r--docker/openvswitch/openvswitch-vswitchd/Dockerfile.j24
4 files changed, 19 insertions, 4 deletions
diff --git a/docker/openvswitch/openvswitch-base/Dockerfile.j2 b/docker/openvswitch/openvswitch-base/Dockerfile.j2
index 6d50d6c63..f540d4886 100644
--- a/docker/openvswitch/openvswitch-base/Dockerfile.j2
+++ b/docker/openvswitch/openvswitch-base/Dockerfile.j2
@@ -14,3 +14,8 @@ RUN apt-get install -y --no-install-recommends \
&& apt-get clean
{% endif %}
+
+COPY extend_start.sh /usr/local/bin/kolla_extend_start
+
+RUN touch /usr/local/bin/kolla_openvswitch_extend_start \
+ && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_openvswitch_extend_start
diff --git a/docker/openvswitch/openvswitch-base/extend_start.sh b/docker/openvswitch/openvswitch-base/extend_start.sh
new file mode 100644
index 000000000..67fc38537
--- /dev/null
+++ b/docker/openvswitch/openvswitch-base/extend_start.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+if [[ ! -d "/var/log/kolla/openvswitch" ]]; then
+ mkdir -p /var/log/kolla/openvswitch
+fi
+if [[ $(stat -c %a /var/log/kolla/openvswitch) != "755" ]]; then
+ chmod 755 /var/log/kolla/openvswitch
+fi
+
+source /usr/local/bin/kolla_openvswitch_extend_start
diff --git a/docker/openvswitch/openvswitch-db-server/Dockerfile.j2 b/docker/openvswitch/openvswitch-db-server/Dockerfile.j2
index 1bcc6e71e..b588a094d 100644
--- a/docker/openvswitch/openvswitch-db-server/Dockerfile.j2
+++ b/docker/openvswitch/openvswitch-db-server/Dockerfile.j2
@@ -2,7 +2,7 @@ FROM {{ namespace }}/{{ image_prefix }}openvswitch-base:{{ tag }}
MAINTAINER {{ maintainer }}
COPY ovs_ensure_configured.sh /usr/local/bin/kolla_ensure_openvswitch_configured
-COPY extend_start.sh /usr/local/bin/kolla_extend_start
-RUN chmod 755 /usr/local/bin/kolla_ensure_openvswitch_configured /usr/local/bin/kolla_extend_start
+COPY extend_start.sh /usr/local/bin/kolla_openvswitch_extend_start
+RUN chmod 755 /usr/local/bin/kolla_ensure_openvswitch_configured /usr/local/bin/kolla_openvswitch_extend_start
{{ include_footer }}
diff --git a/docker/openvswitch/openvswitch-vswitchd/Dockerfile.j2 b/docker/openvswitch/openvswitch-vswitchd/Dockerfile.j2
index 8692f8cee..632e54a23 100644
--- a/docker/openvswitch/openvswitch-vswitchd/Dockerfile.j2
+++ b/docker/openvswitch/openvswitch-vswitchd/Dockerfile.j2
@@ -1,7 +1,7 @@
FROM {{ namespace }}/{{ image_prefix }}openvswitch-base:{{ tag }}
MAINTAINER {{ maintainer }}
-COPY extend_start.sh /usr/local/bin/kolla_extend_start
-RUN chmod 755 /usr/local/bin/kolla_extend_start
+COPY extend_start.sh /usr/local/bin/kolla_openvswitch_extend_start
+RUN chmod 755 /usr/local/bin/kolla_openvswitch_extend_start
{{ include_footer }}