Skip to content
Snippets Groups Projects
Commit 82c426ce authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

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

parents 2d22570a ef24d9e5
No related branches found
No related tags found
No related merge requests found
...@@ -12,4 +12,5 @@ ...@@ -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 @@ ...@@ -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 @@ ...@@ -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 @@ ...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment