From 865ba802317f1680b1e70f001bf95e3f9fa8a2c4 Mon Sep 17 00:00:00 2001 From: Michal Jastrzebski Date: Thu, 1 Oct 2015 12:36:00 +0200 Subject: [PATCH] Removing /dev/log on rsyslog start Currently we seem to be experiencing races between containers. If another containers tries to write to rsyslog before rsyslog container is up and running it will create /dev/log as directory, and that will prevent rsyslog from starting. Change-Id: I88ac27693d12e605f95e3a945fc98783516d7933 Closes-Bug: #1501694 backport: liberty --- docker/logging/rsyslog/Dockerfile.j2 | 2 ++ docker/logging/rsyslog/extend_start.sh | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 docker/logging/rsyslog/extend_start.sh diff --git a/docker/logging/rsyslog/Dockerfile.j2 b/docker/logging/rsyslog/Dockerfile.j2 index db58b799af..c74aecaf21 100644 --- a/docker/logging/rsyslog/Dockerfile.j2 +++ b/docker/logging/rsyslog/Dockerfile.j2 @@ -13,4 +13,6 @@ RUN apt-get install -y --no-install-recommends rsyslog \ {% endif %} +COPY extend_start.sh /usr/local/bin/kolla_extend_start + {{ include_footer }} diff --git a/docker/logging/rsyslog/extend_start.sh b/docker/logging/rsyslog/extend_start.sh new file mode 100644 index 0000000000..0742fa0a22 --- /dev/null +++ b/docker/logging/rsyslog/extend_start.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +if [[ -e "/dev/log" ]]; then + rm -rf /dev/log +fi