Bug 10149

Summary: koha-restart-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   
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    
Attachments: Bug 10149 - koha-stop-zebra error handling
Bug 10149 - koha-restart-zebra error handling
Bug 10149 - koha-restart-zebra error handling (rewording)
Bug 10149 - koha-restart-zebra error handling (rewording)
Signed off patch
Bug 10149 - koha-restart-zebra error handling (rewording)

Description Tomás Cohen Arazi (tcohen) 2013-04-29 14:55:43 UTC
koha-restart-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 14:57:07 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi (tcohen) 2013-04-29 14:58:12 UTC Comment hidden (obsolete)
Comment 3 Tomás Cohen Arazi (tcohen) 2013-04-29 15:03:02 UTC Comment hidden (obsolete)
Comment 4 Tomás Cohen Arazi (tcohen) 2013-04-29 17:37:12 UTC Comment hidden (obsolete)
Comment 5 Chris Cormack 2013-04-30 04:21:15 UTC
Before patch restart without and instance name silently fails, after patch

./debian/scripts/koha-restart-zebra 
Restart Zebra for Koha instances.

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

Missing instance name...

./debian/scripts/koha-restart-zebra p   
Unknown instance p.

sudo ./debian/scripts/koha-restart-zebra persona
Restarting Zebra server for persona

 sudo ./debian/scripts/koha-stop-zebra persona
Stopping Zebra server for persona

sudo ./debian/scripts/koha-restart-zebra persona     2013-04-30 16:20:42 christopher pts/3
Zebra does not appear to have been running for instance persona.
Starting Zebra server for persona
Comment 6 Chris Cormack 2013-04-30 04:21:57 UTC Comment hidden (obsolete)
Comment 7 Mason James 2013-04-30 08:24:53 UTC
Created attachment 17840 [details] [review]
Bug 10149 - koha-restart-zebra error handling (rewording)

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

Regards
To+

Edit:
- changed some wording problems.
- fixed an error in parameter validation

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 8 Mason James 2013-04-30 08:25:38 UTC
> 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 patch...
Comment 9 Jared Camins-Esakov 2013-05-02 02:33:52 UTC
This patch has been pushed to master and 3.12.x.
Comment 10 Chris Cormack 2013-05-09 09:16:18 UTC
Pushed to 3.10.x will be in 3.10.6
Comment 11 Chris Hall 2013-06-17 08:44:15 UTC
Pushed to 3.8.x, will be in 3.8.14