From f098e766760f14debab2ca2a6cf8b77963101a70 Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Mon, 28 Sep 2015 13:06:45 +0000 Subject: [PATCH] Remove config-external for rsyslog Additionally, fix privleges for rsyslog container. It needs to be privleged otherwise it will complain about creating device node Change-Id: I364858f0a1df01b53cee46db3ec7cd5ecbe82c54 Partially-Implements: blueprint replace-config-external --- ansible/roles/common/tasks/start.yml | 2 +- ansible/roles/common/templates/rsyslog.json.j2 | 9 ++++++++- docker/logging/rsyslog/Dockerfile.j2 | 1 - docker/logging/rsyslog/config-external.sh | 16 ---------------- 4 files changed, 9 insertions(+), 19 deletions(-) delete mode 100755 docker/logging/rsyslog/config-external.sh diff --git a/ansible/roles/common/tasks/start.yml b/ansible/roles/common/tasks/start.yml index cb07684260..09d504f01c 100755 --- a/ansible/roles/common/tasks/start.yml +++ b/ansible/roles/common/tasks/start.yml @@ -1,5 +1,4 @@ --- - - name: Starting log_data container docker: docker_api_version: "{{ docker_api_version }}" @@ -31,6 +30,7 @@ username: "{{ docker_registry_username }}" password: "{{ docker_registry_password }}" insecure_registry: "{{ docker_insecure_registry }}" + privileged: True name: rsyslog image: "{{ rsyslog_image_full }}" volumes_from: diff --git a/ansible/roles/common/templates/rsyslog.json.j2 b/ansible/roles/common/templates/rsyslog.json.j2 index fa7018e49c..22c2f0eca7 100644 --- a/ansible/roles/common/templates/rsyslog.json.j2 +++ b/ansible/roles/common/templates/rsyslog.json.j2 @@ -1,4 +1,11 @@ { "command": "/usr/sbin/rsyslogd -n", - "config_files": [] + "config_files": [ + { + "source": "/opt/kolla/config_files/rsyslog.conf", + "dest": "/etc/rsyslog.conf", + "owner": "root", + "perm": "0644" + } + ] } diff --git a/docker/logging/rsyslog/Dockerfile.j2 b/docker/logging/rsyslog/Dockerfile.j2 index 521968f13c..60b81b5ba8 100755 --- a/docker/logging/rsyslog/Dockerfile.j2 +++ b/docker/logging/rsyslog/Dockerfile.j2 @@ -12,7 +12,6 @@ RUN apt-get install -y --no-install-recommends \ && apt-get clean {% endif %} -COPY config-external.sh /opt/kolla/ COPY start.sh / CMD ["/start.sh"] diff --git a/docker/logging/rsyslog/config-external.sh b/docker/logging/rsyslog/config-external.sh deleted file mode 100755 index a935f7dba8..0000000000 --- a/docker/logging/rsyslog/config-external.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -if [[ -f "/dev/log" ]]; then - rm "/dev/log" -fi - -SOURCE="/opt/kolla/rsyslog/rsyslog.conf" -TARGET="/etc/rsyslog.conf" -OWNER="root" - -if [[ -f "$SOURCE" ]]; then - rm $TARGET - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi