https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27115

David Cook <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #190766|0                           |1
        is obsolete|                            |

--- Comment #10 from David Cook <[email protected]> ---
Created attachment 191546
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191546&action=edit
Bug 27115: Use start-stop-daemon to stop in koha-sip

There has been an issue where a restart of koha-sip would sometimes not bring
the SIP server back alive. This is because we have not been waiting for
koha-sip --stop to actually stop the SIP server(s). It is then possible for a
restart to attempt the --start command while a previous instance of SIP server
is still running. As the --start command in this case is not allowed, we would
then end up not starting the SIP server(s) at all.

This patch replaces daemon --stop with start-stop-daemon --stop to ensure
koha-sip daemon actually stops.

start-stop-daemon provides us the --retry option, which we are able to utilize
in waiting for the stop process to finish.

To test:
1. Before applying this patch
2. Run this command

export SIPINSTANCE="your_koha_instance_name"

You can your_koha_instance_name using the koha-list command

3. Configure a SIP server (add some min_servers, e.g. 6, to SIPConfig.xml)
4. koha-sip --enable $SIPINSTANCE
5. koha-sip --verbose --start $SIPINSTANCE
6. Observe "Starting SIP server for ..."
7. koha-sip --verbose --stop $SIPINSTANCE; ps aux | grep $SIPINSTANCE-koha-sip
8. Observe "Stopping SIP server for instancename"
9. In the output, observe the number of SIP servers you defined in step 3, plus
   one.
10. koha-sip --verbose --start $SIPINSTANCE
11. Apply this patch, or edit the koha-sip directly to get changes in place
in your environment, e.g. using command

nano $(which koha-sip)

12. koha-sip --verbose --stop $SIPINSTANCE; ps aux | grep $SIPINSTANCE-koha-sip
13. Observe "Stopping SIP server for instancename"
14. In the output, observe no more SIP servers alive

Signed-off-by: David Nind <[email protected]>
Signed-off-by: David Cook <[email protected]>

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to