Bug 10379 - koha-rebuild-zebra gets noisy if no instances are defined
Summary: koha-rebuild-zebra gets noisy if no instances are defined
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: 3.12
Hardware: All All
: P5 - low minor (vote)
Assignee: Robin Sheat
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-30 04:01 UTC by Robin Sheat
Modified: 2014-12-07 20:02 UTC (History)
6 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 10379 - silence zebra rebuild cron when no instances are enabled (2.87 KB, patch)
2013-05-30 04:16 UTC, Robin Sheat
Details | Diff | Splinter Review
Bug 10379 - [SIGNED-OFF] silence zebra rebuild cron when no instances are enabled (3.03 KB, patch)
2013-06-24 11:29 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 10379 - Followup: add koha-rebuild-zebra -q to the man page (2.54 KB, patch)
2013-06-25 06:55 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 10379 - Followup: add koha-rebuild-zebra -q to the man page (2.58 KB, patch)
2013-06-25 22:15 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 Robin Sheat 2013-05-30 04:01:09 UTC
If koha-rebuild-zebra is given no arguments, it displays the usage. That's quite reasonable, however it means that if you have koha-common installed but no instances defined, you get emailed every 5 minutes about it.

I'm going to add a -q flag that is used by the cron job that suppresses the usage message.
Comment 1 Robin Sheat 2013-05-30 04:16:09 UTC Comment hidden (obsolete)
Comment 2 Magnus Enger 2013-06-24 11:29:00 UTC
Created attachment 19205 [details] [review]
Bug 10379 - [SIGNED-OFF] silence zebra rebuild cron when no instances are enabled

This adds a -q option to koha-rebuild-zebra that prevents it outputting
help if no instances are provided on the command line. This means that
if you've just installed the package, you won't get messages from cron
telling you how to use the script.

Test plan:
* install koha-common 3.12 or master onto a system with no enabled
  instances.
* note that you or the sysadmin will start getting emails every 5
  minutes.
* replace /etc/cron.d/koha-common and /usr/sbin/koha-rebuild-zebra with
  the versions from this patch.
* note that the emails stop flowing.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
"sudo koha-rebuild-zebra -q" gives no output, as expected.
Followed the test plan, all looks good.
Comment 3 Robin Sheat 2013-06-25 00:16:05 UTC
I'm going to pass QA this, as it's simple, only packaging related, and reasonably important.
Comment 4 Magnus Enger 2013-06-25 06:55:13 UTC Comment hidden (obsolete)
Comment 5 Magnus Enger 2013-06-25 06:56:24 UTC
Resetting this to "needs signoff" because of the followup.
Comment 6 Robin Sheat 2013-06-25 22:15:38 UTC
Created attachment 19238 [details] [review]
Bug 10379 - Followup: add koha-rebuild-zebra -q to the man page

The first patch on this bug forgot to add the new -q option to
koha-rebuild-zebra to the man page for that command. This patch
fixes it.

To test, run something like these commands:

$ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
  debian/docs/koha-rebuild-zebra.xml
$ man -l koha-rebuild-zebra.8
This should display the man page. (Remember to remove koha-rebuild-zebra.8
when you are done :-)

$ prove xt/verify-debian-docbook.t
All tests should pass.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Comment 7 Galen Charlton 2013-06-26 15:58:26 UTC
Pushed to master.  Thanks, Robin!
Comment 8 Tomás Cohen Arazi 2013-07-07 00:13:42 UTC
This patch has been pushed to 3.12.x, will be in 3.12.2.

Thanks Robin!
Comment 9 Bernardo Gonzalez Kriegel 2013-07-14 14:12:45 UTC
Pushed to 3.10.x, will be in 3.10.8
Comment 10 Chris Hall 2013-07-18 09:17:31 UTC
Pushed to 3.8.x, will be in 3.8.15