Bug 10670 - /etc/init.d/koha-common fails to start zebra due to log permission problem
Summary: /etc/init.d/koha-common fails to start zebra due to log permission problem
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-01 11:15 UTC by Dobrica Pavlinusic
Modified: 2015-06-04 23:23 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 10670 - koha-common fails to start zebra without log permissions (1.85 KB, patch)
2013-08-01 11:45 UTC, Dobrica Pavlinusic
Details | Diff | Splinter Review
Bug 10670 - koha-common fails to start zebra without log permissions (1.88 KB, patch)
2013-11-14 22:07 UTC, Robin Sheat
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Dobrica Pavlinusic 2013-08-01 11:15:19 UTC

    
Comment 1 Dobrica Pavlinusic 2013-08-01 11:45:04 UTC Comment hidden (obsolete)
Comment 2 I'm just a bot 2013-09-29 05:33:36 UTC
Patch applied cleanly, go forth and signoff
Comment 3 I'm just a bot 2013-10-24 19:36:44 UTC
Patch applied cleanly, go forth and signoff
Comment 4 Robin Sheat 2013-11-14 22:07:42 UTC
Created attachment 22952 [details] [review]
Bug 10670 - koha-common fails to start zebra without log permissions

If koha-common is started when zebra log files are owned by root
it will fail to start without any useful message (since zebra can't
write errors in log files because it lacks permissions to do so).

This patch creates empty log files and ensure they have correct
permissions.

I can't pin-point why log files gets owned root, but I suspect it
has something to do with zebra crashing and logrotate, but this is
just theory. We have seen this behaviour since koha 3.1 every
few months, and every time it happends we have root owned logs and
crashed zebra so this patch will at least help sites which have
some kind of automatic koha-common start if it's not running.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Comment 5 Robin Sheat 2013-11-14 22:09:35 UTC
A small, harmless, and useful change.
Comment 6 Galen Charlton 2013-11-14 23:55:33 UTC
I consider this a bugfix, not an enhancement, so I've pushed this to master and 3.14.x.  Thanks, Dobrica!
Comment 7 Tomás Cohen Arazi 2013-12-08 15:06:14 UTC
This patch has been pushed to 3.12.x, will be in 3.12.8.

Thanks Dobrica!