[SERVER-1865] Official Linux packages don't set up logrotate Created: 27/Sep/10 Updated: 06/Feb/23 Resolved: 06/Feb/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Packaging, Stability |
| Affects Version/s: | 1.6.3 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Chris Lea | Assignee: | [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive) |
| Resolution: | Won't Do | Votes: | 22 |
| Labels: | sdp-backlog-purge | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Debian or Ubuntu systems using the official packages from the 10gen repositories. |
||
| Issue Links: |
|
||||||||||||||||||||||||
| Assigned Teams: |
Server Development Platform
|
||||||||||||||||||||||||
| Backport Requested: |
v4.7, v4.4
|
||||||||||||||||||||||||
| Sprint: | Dev Platform 2020-01-13, Dev Platform 2020-09-21, Dev Platform 2020-10-05, Dev Platform 2020-10-19, Dev Platform 2020-11-16 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
The Ubuntu and Debian packages don't add an entry to /etc/logrotate.d that rotates the logfile in /var/log/mongodb. So on a production system, the file /var/log/mongodb/mongodb.conf just grows unchecked. This will prove problematic for beginners who don't realize that's an issue until they suddenly run out of disk space. Something like this in /etc/logrotate.d should do it: 180:/var/log/mongodb# cat /etc/logrotate.d/mongodb |
| Comments |
| Comment by Iryna Zhuravlova [ 16/Nov/22 ] | ||||||||||||||||
|
After a careful backlog refinement, the team decided to close this ticket because of its low priority and limited resource capacity. If you believe that this ticket requires additional attention from the team and should be re-opened, feel free to change the status to "Needs Scheduling" and ping me or @alexander.neben | ||||||||||||||||
| Comment by Connecting Media [ 10/Dec/19 ] | ||||||||||||||||
|
I am requesting for this to be prioritized as not automatically rotating and compressing logs is very unexpected behavior from a Debian/Ubuntu package. This just adds serveral layers uf unnecessary complications for building images containing MongoDB and the like (at least for me) | ||||||||||||||||
| Comment by Philipp Tkachev [ 03/Mar/17 ] | ||||||||||||||||
|
Guys, you need to build some sort of embedded scheduler, so DB can emulate cron and run scripts like logRotate() on server. | ||||||||||||||||
| Comment by NOVALUE Mitar [ 16/Feb/14 ] | ||||||||||||||||
|
It is not clear if logappend is still needed with this or not? Documentation (http://docs.mongodb.org/manual/tutorial/rotate-log-files/) is here unclear. For me logrotate.d is an external program and it is not clear how it can or cannot interact with official log rotation provided by MongoDB. From what I understand, I can use logrotate.d when I am using syslog for logging, but otherwise I should send USR1 signals to mongod. | ||||||||||||||||
| Comment by Ernie Hershey [ 21/Nov/13 ] | ||||||||||||||||
|
This seems sensible to be. The rpm's should do it too. Here are some examples of other packages that do this: Apache httpd | ||||||||||||||||
| Comment by Sebastian Paul [ 21/Nov/13 ] | ||||||||||||||||
|
i think this needs a higher priority, just had a server crash because of this. Also when you search the web you also don't get one qualified answer on how to set it up correctly. | ||||||||||||||||
| Comment by Russell Smith [ 08/Nov/11 ] | ||||||||||||||||
Reformatted for you. | ||||||||||||||||
| Comment by Seamus Abshere [ 21/Apr/11 ] | ||||||||||||||||
|
For what it's worth, if you're using logrotate (the unix program), you don't need to send USR1... it's redundant.
| ||||||||||||||||
| Comment by Chris Lea [ 27/Sep/10 ] | ||||||||||||||||
|
Sorry. I didn't mean to mark this as "major". Please knock that down a few notches. |