[INTPAK-199] Karaf log file rotation not using desired file rotation scheme Created: 24/Aug/18 Updated: 25/Sep/18 Resolved: 25/Sep/18 |
|
| Status: | Resolved |
| Project: | integration-packaging |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Medium |
| Reporter: | Victor Pickard | Assignee: | Victor Pickard |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
I used karaf to generate some test logs, via: opendaylight-user@root>log:load-test --messaged 500000 --threads 10 I monitored the karaf log rotation, as follows: ()[odl@overcloud-controller-2 /var/log/opendaylight]$ while true; do ls -lhrt karaf.lo*; echo; sleep 1; done; To make it a bit easier to see what was going on, I truncated the karaf.log.1 file to 10 bytes, and karaf.log.2 to 20 bytes. The expectation is that karaf.log would be rotated to karaf.log1, karaf.log1 would be rotated to karaf.log2, which is referred to as "fixed window strategy" Reference: Take a look at the "Rollover stategies section" Instead, we see that karaf.log is rotated to karaf.log.2
The problem is that fileIndex defaults to "max". For the desired behavior, fileIndex should be set to "min". I have tested a fix, will push a patch shortly. |
| Comments |
| Comment by Victor Pickard [ 24/Aug/18 ] |