Merge "Set mongodb log file to shared volume by heka"

This commit is contained in:
Jenkins 2016-03-04 17:01:23 +00:00 committed by Gerrit Code Review
commit 82c426ce3a
4 changed files with 11 additions and 1 deletions

View File

@ -12,4 +12,5 @@
restart_policy: "never"
volumes:
- "{{ node_config_directory }}/mongodb/:{{ container_config_directory }}/:ro"
- "kolla_logs:/var/log/kolla/"
- "mongodb:/var/lib/mongodb/"

View File

@ -8,4 +8,5 @@
privileged: True
volumes:
- "{{ node_config_directory }}/mongodb/:{{ container_config_directory }}/:ro"
- "kolla_logs:/var/log/kolla/"
- "mongodb:/var/lib/mongodb"

View File

@ -4,7 +4,7 @@
dbpath = /var/lib/mongodb
# where to log
logpath = /var/log/mongodb/mongodb.log
logpath = /var/log/kolla/mongodb/mongodb.log
logappend = true

View File

@ -2,6 +2,14 @@
echo "run extended start"
if [[ ! -d "/var/log/kolla/mongodb" ]]; then
mkdir -p /var/log/kolla/mongodb
fi
if [[ $(stat -c %a /var/log/kolla/mongodb) != "755" ]]; then
chmod 755 /var/log/kolla/mongodb
fi
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then