Bug 10144

Summary: koha-start-zebra error handling
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: PackagingAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P5 - low CC: chris, chrish, mtj, robin
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: 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: 4876, 10259    
Attachments: Bug 10144 - koha-start-zebra error handling
Bug 10144 - koha-start-zebra error handling
Signed off patch
Bug 10144 - koha-start-zebra error handling

Description Tomás Cohen Arazi (tcohen) 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 (tcohen) 2013-04-29 13:58:24 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi (tcohen) 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