[library] Logs from MongoDB server should be written to a separate file instead of syslog
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Fix Committed
|
High
|
Matthew Mosesohn | ||
5.0.x |
Fix Committed
|
High
|
Tomasz 'Zen' Napierala | ||
5.1.x |
Fix Committed
|
High
|
Tomasz 'Zen' Napierala | ||
6.0.x |
Fix Released
|
High
|
Matthew Mosesohn |
Bug Description
Recently I ran long-time Rally performance test of OpenStack environment deployed using Fuel and after 10 hours of testing I observed that MySQL on primary controller is down due to lack of free disk space:
<27>Sep 9 09:58:01 node-1 mysqld: 2014-09-09 09:58:01 8287 [Warning] Disk is full writing './mysql-
It also caused a lot of errors in other services such as nova-api and rabbitmq. Configuration of cluster was the following:
1. CentOS, HA, KVM, NovaFlatDHCP, Sahara, Ceilometer, OpenStack debug logging enabled
2. 1 controller+mongo, 2 controller+
And I used default disk partitioning configuration, so for 'root' filesystem was allocated 44 GB of disk space. During performance testing all of free disk space was occupied by huge log file:
[root@node-1 ~]# ls -lah /var/log/messages
-rw-------. 1 root root 30G Sep 9 09:43 /var/log/messages
And most of its content belonged to mongodb server:
[root@node-1 ~]# wc -l /var/log/messages
67681931 /var/log/message
[root@node-1 ~]# awk '{print $5}' /var/log/messages | sort | uniq -c | sort -n | tail -5
760 kernel:
1000 nailgun-agent:
53995 rabbitmq
3930722 haproxy[47952]:
63490772 mongod.
Here you can find the part of MongoDB logs:
http://
As you can see 93% of lines in /var/log/messages file were from MongoDB server and it wasn't rotated by logrotate, because that file is rotated weekly. In my opinion to avoid such issues we should configure rsyslog to write MongoDB logs to a separate file and add it to the logrotate's hourly rotation config (/etc/logrotate
Also, probably it's safer to create a separate LVM volume specially for logs and mount it to the /var/log, so then we could increase it's size in case of 'OpenStack debug logging' option is enabled.
Changed in fuel: | |
status: | New → Confirmed |
Changed in fuel: | |
assignee: | Fuel Library Team (fuel-library) → Tomasz 'Zen' Napierala (tzn) |
Changed in fuel: | |
milestone: | 5.1 → 6.0 |
milestone: | 6.0 → 5.1 |
Changed in fuel: | |
status: | Confirmed → In Progress |
Changed in fuel: | |
status: | Fix Released → Fix Committed |
Fix proposed to branch: master /review. openstack. org/120588
Review: https:/