Fix influxdb container

Add influxdb log directory

Closes-Bug: #1655001

Change-Id: I9661fe8e8138adf7f1f50f2f2864ee4683f956d9
This commit is contained in:
zhubingbing 2017-01-09 07:12:24 +00:00
parent 95bb052fe7
commit e89536405f
2 changed files with 14 additions and 0 deletions

View File

@ -9,8 +9,11 @@ MAINTAINER {{ maintainer }}
{{ macros.install_packages(influxdb_packages | customizable("packages")) }}
COPY influxdb_sudoers /etc/sudoers.d/kolla_influxdb_sudoers
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 750 /etc/sudoers.d \
&& chmod 440 /etc/sudoers.d/kolla_influxdb_sudoers \
&& chmod 755 /usr/local/bin/kolla_extend_start \
&& usermod -a -G kolla influxdb
{% block influxdb_footer %}{% endblock %}

View File

@ -0,0 +1,11 @@
#!/bin/bash
# Create log directory, with appropriate permissions
INFLUXDB_LOG_DIR=/var/log/kolla/influxdb
if [[ ! -d "${INFLUXDB_LOG_DIR}" ]]; then
mkdir -p ${INFLUXDB_LOG_DIR}
fi
if [[ $(stat -c %a ${INFLUXDB_LOG_DIR}) != "755" ]]; then
chmod 755 ${INFLUXDB_LOG_DIR}
fi