[Bug 12263] New: SIPServer does not respond correctly to signals
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12263 Bug ID: 12263 Summary: SIPServer does not respond correctly to signals Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: SIP2 Assignee: koha-bugs@lists.koha-community.org Reporter: colin.campbell@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: colin.campbell@ptfs-europe.com The Sipserver class is derived from Net::Server part of Net::Server's functionality is to respond to signals with standard and pedictable behaviour. i.e. send a HUP signal and the server should restart its children send a QUIT signal and the server should shutdown cleanly This does not work with the currently shipped version send a HUP and it will log that it is re-exec'ing the process but this fails -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12263 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |colin.campbell@ptfs-europe. |ity.org |com --- Comment #1 from Colin Campbell <colin.campbell@ptfs-europe.com> --- Created attachment 28278 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28278&action=edit Proposed path To test: In order to easily get the pid of the controlling process add pid_file='/tmp/sippid' option to the servers section of your SIPConfig, this saves you from having to look at ps or equivalent to get the relevant pid `cat /tmp/sippid` will return it. The sip server will update the file and remove it on a clean shutdown. If not running the process as root, designate a location writable by the running process. While running kill -s HUP sippid will restart all children of server (in ps view the pids of the child processes will have changed) ( it reattaches the socket it is listening on) kill -s QUIT sippid will shutdown the server and its children -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12263 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12263 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28278|0 |1 is obsolete| | --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 28720 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28720&action=edit Bug 12263 Fix startup issues blocking response to HUP If you do a kill -s HUP sipserver_pid the server process should restart its children. This was not happening although it was logging the commencement of the process. Removed traces of Exporter usage this was always incorrect this program inherits from Net::Server 'use base' to make inheritance clearer. Removed unnecessary begin block made file executable so it can run added a shebang line so OS knows to invoke perl to compile and run the file. I've removed the debug code dumping the config to STDOUT, it should not have gone into the production version. One of the first things this program does is close stdout etc and reopens the sip sockets to them. Assuming you can print to them other than as part of the sip dialogue is not always safe. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12263 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28720|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 29117 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29117&action=edit [PASSED QA] Bug 12263 Fix startup issues blocking response to HUP If you do a kill -s HUP sipserver_pid the server process should restart its children. This was not happening although it was logging the commencement of the process. Removed traces of Exporter usage this was always incorrect this program inherits from Net::Server 'use base' to make inheritance clearer. Removed unnecessary begin block made file executable so it can run added a shebang line so OS knows to invoke perl to compile and run the file. I've removed the debug code dumping the config to STDOUT, it should not have gone into the production version. One of the first things this program does is close stdout etc and reopens the sip sockets to them. Assuming you can print to them other than as part of the sip dialogue is not always safe. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12263 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Patch complexity|--- |Small patch --- Comment #4 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Should the status of this report be already Passed QA? Looking at the attachment name and two sign-offs.. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12263 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |kyle@bywatersolutions.com --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Yep! (In reply to M. de Rooy from comment #4)
Should the status of this report be already Passed QA? Looking at the attachment name and two sign-offs..
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12263 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Colin! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org