logrotate fails to rotate mongo logs, disk fills up, Fuel gets corrupt
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Fix Released
|
High
|
Bogdan Dobrelya | ||
6.0.x |
Won't Fix
|
High
|
Fuel Library (Deprecated) |
Bug Description
logrotate fails to rotate logs with errors like this (running logrotate -v):
> ... cut ...
> dateext suffix '-20150302'
> glob pattern '-[0-9]
> renaming /var/log/
> old log /var/log/
> renaming /var/log/
> old log /var/log/
> renaming /var/log/
> old log /var/log/
> renaming /var/log/
> old log /var/log/
> renaming /var/log/
> old log /var/log/
> copying /var/log/
> error: error creating output file /var/log/
> [root@fuel-juno ~]# ls -l /var/log/
> -rw-r----- 1 root adm 27894054211 Mar 2 08:50 /var/log/
> -rw-r----- 1 root adm 449987680 Feb 27 19:01 /var/log/
> -rw-r----- 1 root adm 16194075 Feb 27 18:00 /var/log/
This leads to the same problems as described in bug #1383741, where Fuel gets corrupt and unable to, for example, deploy new nodes.
This has not only been a problem with mongod*.log; We've seen it with other files as well. Manually removing the .1 files have lead to logrotate successfully running, but after a while it pops up again.
How logrotate gets to this state we're not sure, and we don't think it's because the mongo log is too big, as we've seen it with smaller files as well. Unfortunately I have not recorded those files as I thought this was a only-happens-once thing.
The main problem for us is currently that the mongo log, as stated earlier, is way too big. The log level of 1 in /etc/mongo.conf on the mongo server sets mongo to log /every write operation/. That's a lot for the 72 nodes we have, and we've barely started using them.
Another thing that I currently can't back up is that I think if a rotation of a file in the middle of the logrotate pattern fails, none of the later files will rotate, again leading to the mongo log never rotating an filling the disk...
Changed in fuel: | |
assignee: | nobody → Fuel Library Team (fuel-library) |
milestone: | none → 6.1 |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in fuel: | |
importance: | Medium → High |
Changed in fuel: | |
assignee: | Fuel Library Team (fuel-library) → Bogdan Dobrelya (bogdando) |
Changed in fuel: | |
assignee: | Bogdan Dobrelya (bogdando) → Sergii Golovatiuk (sgolovatiuk) |
status: | Won't Fix → In Progress |
Changed in fuel: | |
assignee: | Sergii Golovatiuk (sgolovatiuk) → Bogdan Dobrelya (bogdando) |
tags: | added: logrotate |
no longer affects: | fuel/6.1.x |
tags: | added: ct1 customer-found support |
Please provide the Fuel version and diagnostic logs snapshot, if possible