aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ansible/roles/neutron/tasks/start.yml2
-rw-r--r--ansible/roles/neutron/templates/openvswitch-db-server.json.j22
-rw-r--r--ansible/roles/neutron/templates/openvswitch-vswitchd.json.j22
-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
7 files changed, 23 insertions, 6 deletions
diff --git a/ansible/roles/neutron/tasks/start.yml b/ansible/roles/neutron/tasks/start.yml
index ee37e8d15..80e65b601 100644
--- a/ansible/roles/neutron/tasks/start.yml
+++ b/ansible/roles/neutron/tasks/start.yml
@@ -9,6 +9,7 @@
- "{{ node_config_directory }}/openvswitch-db-server/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "/run:/run"
+ - "kolla_logs:/var/log/kolla/"
- "openvswitch_db:/var/lib/openvswitch/"
when:
- (inventory_hostname in groups['compute']
@@ -57,6 +58,7 @@
- "/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'])
diff --git a/ansible/roles/neutron/templates/openvswitch-db-server.json.j2 b/ansible/roles/neutron/templates/openvswitch-db-server.json.j2
index ed1773ea2..937d056da 100644
--- a/ansible/roles/neutron/templates/openvswitch-db-server.json.j2
+++ b/ansible/roles/neutron/templates/openvswitch-db-server.json.j2
@@ -1,4 +1,4 @@
{
- "command": "/usr/sbin/ovsdb-server /etc/openvswitch/conf.db -vconsole:emer -vsyslog:err -vfile:info --remote=punix:/run/openvswitch/db.sock --log-file=/var/log/openvswitch/ovsdb-server.log",
+ "command": "/usr/sbin/ovsdb-server /etc/openvswitch/conf.db -vconsole:emer -vsyslog:err -vfile:info --remote=punix:/run/openvswitch/db.sock --log-file=/var/log/kolla/openvswitch/ovsdb-server.log",
"config_files": []
}
diff --git a/ansible/roles/neutron/templates/openvswitch-vswitchd.json.j2 b/ansible/roles/neutron/templates/openvswitch-vswitchd.json.j2
index b0d8d0712..97308d886 100644
--- a/ansible/roles/neutron/templates/openvswitch-vswitchd.json.j2
+++ b/ansible/roles/neutron/templates/openvswitch-vswitchd.json.j2
@@ -1,4 +1,4 @@
{
- "command": "/usr/sbin/ovs-vswitchd unix:/run/openvswitch/db.sock -vconsole:emer -vsyslog:err -vfile:info --mlockall --log-file=/var/log/openvswitch/ovs-vswitchd.log",
+ "command": "/usr/sbin/ovs-vswitchd unix:/run/openvswitch/db.sock -vconsole:emer -vsyslog:err -vfile:info --mlockall --log-file=/var/log/kolla/openvswitch/ovs-vswitchd.log",
"config_files": []
}
diff --git a/docker/openvswitch/openvswitch-base/Dockerfile.j2 b/docker/openvswitch/openvswitch-base/Dockerfile.j2
index 558339baf..1dd566438 100644
--- a/docker/openvswitch/openvswitch-base/Dockerfile.j2
+++ b/docker/openvswitch/openvswitch-base/Dockerfile.j2
@@ -14,3 +14,8 @@ RUN apt-get -y install --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 }}