Bug 10144 - koha-start-zebra error handling
Summary: koha-start-zebra error handling
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 4876 10259
  Show dependency treegraph
 
Reported: 2013-04-29 13:50 UTC by Tomás Cohen Arazi
Modified: 2014-05-26 21:04 UTC (History)
4 users (show)

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


Attachments
Bug 10144 - koha-start-zebra error handling (3.86 KB, patch)
2013-04-29 13:58 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 10144 - koha-start-zebra error handling (4.02 KB, patch)
2013-04-29 18:07 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Signed off patch (4.07 KB, patch)
2013-04-30 04:11 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 10144 - koha-start-zebra error handling (4.16 KB, patch)
2013-04-30 08:19 UTC, Mason James
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2013-04-29 13:50:52 UTC
koha-start-zebra should check stuff like if the instance exists, if its enabled, if zebra isn't already running, etc.
Comment 1 Tomás Cohen Arazi 2013-04-29 13:58:24 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi 2013-04-29 18:07:40 UTC Comment hidden (obsolete)
Comment 3 Chris Cormack 2013-04-30 04:10:59 UTC
Before the patch, starting with no instance name silently failed,now

 ./debian/scripts/koha-start-zebra                    
Starts Zebra for Koha instances.

Usage: ./debian/scripts/koha-start-zebra instancename1 instancename2...

Missing instance name...


sudo ./debian/scripts/koha-start-zebra persona    
Zebra already running for instance persona.

sudo koha-disable persona 
sudo ./debian/scripts/koha-start-zebra persona
Instance persona disabled. No action taken.

ps axf | grep "zebrasrv"
10168 pts/3    S+     0:00          |               \_ grep zebrasrv

sudo ./debian/scripts/koha-start-zebra persona
Starting Zebra server for persona

ps axf | grep "zebrasrv"  
10250 pts/3    S+     0:00          |               \_ grep zebrasrv
10216 ?        S      0:00 daemon --name=persona-koha-zebra --errlog=/var/log/koha/persona/zebra-error.log --stdout=/var/log/koha/persona/zebra.log --output=/var/log/koha/persona/zebra-output.log --verbose=1 --respawn --delay=30 --user=persona-koha.persona-koha -- zebrasrv -v none,fatal,warn -f /etc/koha/sites/persona/koha-conf.xml
10217 ?        S      0:00  \_ zebrasrv -v none,fatal,warn -f /etc/koha/sites/persona/koha-conf.xml
Comment 4 Chris Cormack 2013-04-30 04:11:55 UTC Comment hidden (obsolete)
Comment 5 Mason James 2013-04-30 08:19:16 UTC
Created attachment 17839 [details] [review]
Bug 10144 - koha-start-zebra error handling

koha-start-zebra now
- Checks the instance exists.
- Checks the instance is enabled.
- Checks if the zebra daemon is already running.

Regards
To+

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Comment 6 Mason James 2013-04-30 08:19:56 UTC
(In reply to comment #5)
> Created attachment 17839 [details] [review] [review]
> Bug 10144 - koha-start-zebra error handling
> 
> koha-start-zebra now
> - Checks the instance exists.
> - Checks the instance is enabled.
> - Checks if the zebra daemon is already running.
> 
> Regards
> To+
> 
> Sponsored-by: Universidad Nacional de Córdoba
> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
> Signed-off-by: Mason James <mtj@kohaaloha.com>

passing QA on this...
Comment 7 Jared Camins-Esakov 2013-05-02 02:33:53 UTC
This patch has been pushed to master and 3.12.x.
Comment 8 Chris Cormack 2013-05-09 09:17:15 UTC
Pushed to 3.10.x will be in 3.10.6
Comment 9 Chris Hall 2013-06-17 08:44:24 UTC
Pushed to 3.8.x, will be in 3.8.14