Summary: | Make koha-common.logrotate use copytruncate | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Packaging | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Josef Moravec <josef.moravec> |
Severity: | normal | ||
Priority: | P5 - low | CC: | hagud, josef.moravec, liz, mirko, mtj |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 20234 | ||
Bug Blocks: | 17468 | ||
Attachments: |
Bug 19610: Make koha-common.logroate use copytruncate
Bug 19610: Make koha-common.logroate use copytruncate Bug 19610: Make koha-common.logroate use copytruncate Bug 19610: Make koha-common.logrotate use copytruncate |
Description
Tomás Cohen Arazi (tcohen)
2017-11-12 03:44:20 UTC
Created attachment 71884 [details] [review] Bug 19610: Make koha-common.logroate use copytruncate This patch makes logrotate use the **copytruncate** directive, removing the need to stop the Zebra and Plack servers on log rotation. To test: - Run: $ misc4dev/cp_debian_files.pl - Edit the new /etc/logrotate.d/koha-common file changing 'weekly' for 'hourly'. This is to ease testing. - Run: $ sudo ls -l /var/log/koha/kohadev - Open a second terminal on your kohadevbox. On it... - Run: $ sudo logrotate /etc/logrotate.d/koha-common - Run: $ sudo ls -l /var/log/koha/kohadev => SUCCESS: Files got rotated! (i.e. files ending in .1 are created, the sizes make sense (.1 have contents, the ones without numbering probably zeroed <- it will depend on what's happening with your devbox in between). - Play with your Koha, do some searches too: => SUCCESS: You have access to your Koha, searches work. i.e.: - Apache handled the log rotation operation - Plack handled the log rotation operation - Zebra handled the log rotation operation - Sign off :-D! Sponsored-by: Orex Digital Created attachment 71997 [details] [review] Bug 19610: Make koha-common.logroate use copytruncate This patch makes logrotate use the **copytruncate** directive, removing the need to stop the Zebra and Plack servers on log rotation. To test: - Run: $ misc4dev/cp_debian_files.pl - Edit the new /etc/logrotate.d/koha-common file changing 'weekly' for 'hourly'. This is to ease testing. - Run: $ sudo ls -l /var/log/koha/kohadev - Open a second terminal on your kohadevbox. On it... - Run: $ sudo logrotate /etc/logrotate.d/koha-common - Run: $ sudo ls -l /var/log/koha/kohadev => SUCCESS: Files got rotated! (i.e. files ending in .1 are created, the sizes make sense (.1 have contents, the ones without numbering probably zeroed <- it will depend on what's happening with your devbox in between). - Play with your Koha, do some searches too: => SUCCESS: You have access to your Koha, searches work. i.e.: - Apache handled the log rotation operation - Plack handled the log rotation operation - Zebra handled the log rotation operation - Sign off :-D! Sponsored-by: Orex Digital Signed-off-by: Hugo Agud hagud@orex.es Hi Hugo, please set your credentials in your development system. Your patch says > Signed-off-by: Your Full Name <your_email> You can find some information here: https://wiki.koha-community.org/wiki/Version_Control_Using_Git#Getting_Started_with_Git fixed.. thanks! Created attachment 72040 [details] [review] Bug 19610: Make koha-common.logroate use copytruncate This patch makes logrotate use the **copytruncate** directive, removing the need to stop the Zebra and Plack servers on log rotation. To test: - Run: $ misc4dev/cp_debian_files.pl - Edit the new /etc/logrotate.d/koha-common file changing 'weekly' for 'hourly'. This is to ease testing. - Run: $ sudo ls -l /var/log/koha/kohadev - Open a second terminal on your kohadevbox. On it... - Run: $ sudo logrotate /etc/logrotate.d/koha-common - Run: $ sudo ls -l /var/log/koha/kohadev => SUCCESS: Files got rotated! (i.e. files ending in .1 are created, the sizes make sense (.1 have contents, the ones without numbering probably zeroed <- it will depend on what's happening with your devbox in between). - Play with your Koha, do some searches too: => SUCCESS: You have access to your Koha, searches work. i.e.: - Apache handled the log rotation operation - Plack handled the log rotation operation - Zebra handled the log rotation operation - Sign off :-D! Sponsored-by: Orex Digital Signed-off-by: Hugo Agud hagud@orex.es Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 72042 [details] [review] Bug 19610: Make koha-common.logrotate use copytruncate This patch makes logrotate use the **copytruncate** directive, removing the need to stop the Zebra and Plack servers on log rotation. To test: - Run: $ misc4dev/cp_debian_files.pl - Edit the new /etc/logrotate.d/koha-common file changing 'weekly' for 'hourly'. This is to ease testing. - Run: $ sudo ls -l /var/log/koha/kohadev - Open a second terminal on your kohadevbox. On it... - Run: $ sudo logrotate /etc/logrotate.d/koha-common - Run: $ sudo ls -l /var/log/koha/kohadev => SUCCESS: Files got rotated! (i.e. files ending in .1 are created, the sizes make sense (.1 have contents, the ones without numbering probably zeroed <- it will depend on what's happening with your devbox in between). - Play with your Koha, do some searches too: => SUCCESS: You have access to your Koha, searches work. i.e.: - Apache handled the log rotation operation - Plack handled the log rotation operation - Zebra handled the log rotation operation - Sign off :-D! Sponsored-by: Orex Digital Signed-off-by: Hugo Agud hagud@orex.es Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Just a not: cp_debian_files.pl does not handle koha-common.logrotate Pushed to master for 18.05, thanks to everybody involved! |