Summary: | Allow running Zebra daemon for disabled instances in packages | ||
---|---|---|---|
Product: | Koha | Reporter: | Larry Baerveldt <larry> |
Component: | Packaging | Assignee: | Larry Baerveldt <larry> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | chris, mirko, mtj, robin, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 13785 | ||
Attachments: |
Koha-stop-zebra should also work for disabled instances
Koha-stop-zebra should also work for disabled instances Bug 13784: Koha-stop-zebra should also work for disabled instances Bug 13784: koha-stop-zebra should also work for disabled instances Bug 13784: (QA followup) allow running Zebra for disabled instances on packages Bug 13784: (QA followup) allow running Zebra for disabled instances on packages |
Description
Larry Baerveldt
2015-03-03 15:02:14 UTC
Created attachment 36412 [details] [review] Koha-stop-zebra should also work for disabled instances Currently koha-stop-zebra will not stop zebra for disabled instances. It should work more like koha-stop-sip, which does work for disabled instances. Also, koha-stop-zebra is called by '/etc/init.d/koha-common stop' which clearly should also apply to disabled instances. To Test: 1) Disable a koha instance. 2) Run koha-stop-zebra INSTANCE. You should get message "Instance INSTANCE disabled. No action taken." 3) Apply patch, and copy patched file debian/scripts/koha-stop-zebra to package site over /usr/sbin/koha-stop-zebra. 4) Disable koha instance. 5) Run koha-stop-zebra INSTANCE. It should now stop zebra. Wouldn't it make more sense to make to have koha-disable stop Zebra (if it does not do that atm)? Why would you have Zebra running for disabled instances and need to disable it with koha-stop-zebra? (In reply to Mirko Tietgen from comment #2) > Wouldn't it make more sense to make to have koha-disable stop Zebra (if it > does not do that atm)? Why would you have Zebra running for disabled > instances and need to disable it with koha-stop-zebra? You are correct, but there's also no reason to have it not work if it could be useful in some weird circumstance. It's not even that weird of a situation. We often need to temporarily block access to a site for both the public catalog and the staff client (such as when performing maintenance, or other actions where we wouldn't want the database to be touched), and disabling the instance is the fastest way to do that, and still present a "maintenance" page to the user. Unless you remember to stop zebra manually first, then if you have already disabled the instance, then you *can't* stop zebra without just killing the processes. This patch addresses that. Also, I did just submit a patch for koha-disable to stop zebra (and SIP) (see 13785). However, for that patch to work, this one first has to be pushed. Well the idea being that if koha-disable stops zebra, then zebra still running would be a weird situation :) I'm quite happy with all these patches, all going well I'll have a real look at them tomorrow and get them through. Created attachment 36508 [details] [review] Koha-stop-zebra should also work for disabled instances Currently koha-stop-zebra will not stop zebra for disabled instances. It should work more like koha-stop-sip, which does work for disabled instances. Also, koha-stop-zebra is called by '/etc/init.d/koha-common stop' which clearly should also apply to disabled instances. To Test: 1) Disable a koha instance. 2) Run koha-stop-zebra INSTANCE. You should get message "Instance INSTANCE disabled. No action taken." 3) Apply patch, and copy patched file debian/scripts/koha-stop-zebra to package site over /usr/sbin/koha-stop-zebra. 4) Disable koha instance. 5) Run koha-stop-zebra INSTANCE. It should now stop zebra. http://bugs.koha-community.org/show_bug.cgi?id=13784 Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Created attachment 36520 [details] [review] Bug 13784: Koha-stop-zebra should also work for disabled instances Currently koha-stop-zebra will not stop zebra for disabled instances. It should work more like koha-stop-sip, which does work for disabled instances. Also, koha-stop-zebra is called by '/etc/init.d/koha-common stop' which clearly should also apply to disabled instances. To Test: 1) Disable a koha instance. 2) Run koha-stop-zebra INSTANCE. You should get message "Instance INSTANCE disabled. No action taken." 3) Apply patch, and copy patched file debian/scripts/koha-stop-zebra to package site over /usr/sbin/koha-stop-zebra. 4) Disable koha instance. 5) Run koha-stop-zebra INSTANCE. It should now stop zebra. http://bugs.koha-community.org/show_bug.cgi?id=13784 Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Robin Sheat <robin@catalyst.net.nz> Created attachment 36728 [details] [review] Bug 13784: koha-stop-zebra should also work for disabled instances Currently koha-stop-zebra will not stop zebra for disabled instances. It should work more like koha-stop-sip, which does work for disabled instances. Also, koha-stop-zebra is called by '/etc/init.d/koha-common stop' which clearly should also apply to disabled instances. To Test: 1) Disable a koha instance. 2) Run koha-stop-zebra INSTANCE. You should get message "Instance INSTANCE disabled. No action taken." 3) Apply patch, and copy patched file debian/scripts/koha-stop-zebra to package site over /usr/sbin/koha-stop-zebra. 4) Disable koha instance. 5) Run koha-stop-zebra INSTANCE. It should now stop zebra. http://bugs.koha-community.org/show_bug.cgi?id=13784 Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Robin Sheat <robin@catalyst.net.nz> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Created attachment 36729 [details] [review] Bug 13784: (QA followup) allow running Zebra for disabled instances on packages Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> It is not clear to me that we should control disabled instances with /etc/init.d/koha-common as it is a special situation in which you want to run the zebra daemon on a disabled instance. Most people disable an instance and expect is to be off. I agree with adding some flexibility to the koha-{start|stop|restart}-zebra scripts, but I'm not sure we should change the current behaviour for the init script (i.e. removing --enabled). Created attachment 36730 [details] [review] Bug 13784: (QA followup) allow running Zebra for disabled instances on packages Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Patch pushed to master. Thanks Larry! Pushed to 3.18.x will be in 3.18.5 Pushed to 3.16.x, will be in 3.16.9 nice one Larry :) |