Set mongodb log file to shared volume by heka
TrivialFix Change-Id: I085ef2884749bb4ecc546b78052a5688e8b36ad3
This commit is contained in:
parent
ebc1bbb081
commit
ef24d9e597
@ -12,4 +12,5 @@
|
|||||||
restart_policy: "never"
|
restart_policy: "never"
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ node_config_directory }}/mongodb/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/mongodb/:{{ container_config_directory }}/:ro"
|
||||||
|
- "kolla_logs:/var/log/kolla/"
|
||||||
- "mongodb:/var/lib/mongodb/"
|
- "mongodb:/var/lib/mongodb/"
|
||||||
|
@ -8,4 +8,5 @@
|
|||||||
privileged: True
|
privileged: True
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ node_config_directory }}/mongodb/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/mongodb/:{{ container_config_directory }}/:ro"
|
||||||
|
- "kolla_logs:/var/log/kolla/"
|
||||||
- "mongodb:/var/lib/mongodb"
|
- "mongodb:/var/lib/mongodb"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
dbpath = /var/lib/mongodb
|
dbpath = /var/lib/mongodb
|
||||||
|
|
||||||
# where to log
|
# where to log
|
||||||
logpath = /var/log/mongodb/mongodb.log
|
logpath = /var/log/kolla/mongodb/mongodb.log
|
||||||
|
|
||||||
logappend = true
|
logappend = true
|
||||||
|
|
||||||
|
@ -2,6 +2,14 @@
|
|||||||
|
|
||||||
echo "run extended start"
|
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
|
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
|
||||||
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
||||||
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user