jmsperu opened a new pull request, #14817:
URL: https://github.com/apache/cloudstack/pull/14817
### Description
On redundant routers conntrackd writes to /var/log/conntrackd.log (General {
LogFile on }), but /etc/logrotate.d/conntrackd only rotates
conntrackd-stats.log, a file that is not written any more. conntrackd.log is
therefore never rotated and can fill /var over time.
This PR adds /var/log/conntrackd.log to the logrotate file (maxsize 10M, 2
rotations, compressed, copytruncate so conntrackd keeps its file handle).
Related to #6718. I could not reproduce the fast growth reported there with
plain traffic on 4.22.1.1 (3000 new connections through the PRIMARY router did
not add a byte), so this closes the unbounded growth, not necessarily the
reporter's exact trigger.
### Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
### Feature/Enhancement Scale or Bug Severity
#### Bug Severity
- [x] Minor
### How Has This Been Tested?
On a redundant router pair in a lab (CloudStack 4.22.1.1, KVM), on the
PRIMARY router:
| Step | Result |
|---|---|
| Original /etc/logrotate.d/conntrackd | names only
/var/log/conntrackd-stats.log |
| conntrackd.log grown to 11 MB, logrotate run with the original file | not
rotated, still 11 MB |
| Fixed file installed, `logrotate -d` | no syntax error, both logs listed,
"log needs rotating" for conntrackd.log |
| logrotate run with the fixed file | conntrackd.log is 0 bytes,
conntrackd.log.1 holds the 11 MB |
| conntrackd after the rotation | same process ID as before (not restarted),
still holds the log file open |
| Second logrotate run straight after | nothing to do, no change |
https://claude.ai/code/session_01CUwgtFEPLkr62vbUayjCDZ
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]