[Bug 19610] New: koha-common.logrotate should use copytruncate
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19610 Bug ID: 19610 Summary: koha-common.logrotate should use copytruncate Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Packaging Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org CC: mirko@abunchofthings.net Both bug 15713 and bug 16138 introduce service restarts when log rotation happens. This is done: - Stop services (plack and zebra) - Rotate the log file - Start services (plack and zebra) This can be avoided by using the 'copytruncate' directive in the logrotate configuration [1] [1] Search for 'copytruncate' here https://linux.die.net/man/8/logrotate -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19610 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |liz@catalyst.net.nz -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19610 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|koha-common.logrotate |Make koha-common.logrotate |should use copytruncate |use copytruncate -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19610 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19610 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19610 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 71884 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71884&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19610 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |20234 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20234 [Bug 20234] Make maintenance scripts use koha-zebra instead of koha-*-zebra -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19610 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17468 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17468 [Bug 17468] Remove koha-*-zebra scripts in favor of koha-zebra -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19610 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hagud@orex.es -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19610 Hugo Agud <hagud@orex.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #71884|0 |1 is obsolete| | --- Comment #2 from Hugo Agud <hagud@orex.es> --- Created attachment 71997 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71997&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19610 Hugo Agud <hagud@orex.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19610 --- Comment #3 from Mirko Tietgen <mirko@abunchofthings.net> --- 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_Start... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19610 --- Comment #4 from Hugo Agud <hagud@orex.es> --- fixed.. thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19610 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19610 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #71997|0 |1 is obsolete| | --- Comment #5 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 72040 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72040&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19610 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #72040|0 |1 is obsolete| | --- Comment #6 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 72042 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72042&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19610 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com QA Contact|testopia@bugs.koha-communit |josef.moravec@gmail.com |y.org | --- Comment #7 from Josef Moravec <josef.moravec@gmail.com> --- Just a not: cp_debian_files.pl does not handle koha-common.logrotate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19610 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 18.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19610 Bug 19610 depends on bug 20234, which changed state. Bug 20234 Summary: Make maintenance scripts use koha-zebra instead of koha-*-zebra https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20234 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19610 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org