[Bug 10624] New: koha-common.init should implement the 'status' option switch
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10624 Bug ID: 10624 Summary: koha-common.init should implement the 'status' option switch Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Packaging Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz There's a status option on the script that is currently commented out. An implementation of it is needed. Trying to capture what Robin said on IRC, it should: - Know what should be running - Check if everything is running correctly - Return a warning otherwise -- 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=10624 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |10617 -- 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=10624 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |10622 -- 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=10624 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- 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=10624 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 20746 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20746&action=edit Bug 10624: 'status' option switch for the packages init script This patch makes the init script return the status of the relevant processes. It relies on the koha-list switches added by 10622, and is written on top of the patch from 10617 that cleaned the init script. To test: - Apply the patch (+ 10622 so the SIP part works), build package and install - Run $ service koha-common status Note: it can be tested just copying the debian/koha-common.init script to a server running koha-common instances and calling it $ ./koha-common.init status If you don't have a patched koha-list command it will fail to report SIP servers status. Regards To+ Sponsored-by: Universidad Nacional de Cordoba -- 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=10624 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored -- 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=10624 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- 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=10624 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply --- Comment #2 from Robin Sheat <robin@catalyst.net.nz> --- I think there's something confusing git going on here. I apply 10617 and 10622 and end up with a result that's different to what the patch says it should be. It might just be a matter of rebasing against current master. My patch ends up with: -# TODO: Implement this. It should check every daemon is running -# status) -# status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? -# ;; - *) - #echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2 - echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 - exit 3 - ;; + ;; + esac + ;; +esac + ;; +esac + ;a_status + ;a_status +status +atus +status *) + +status *) +age: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2 + exit 3 + ;; esac : -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10624 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10624 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #20746|0 |1 is obsolete| | --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 21242 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21242&action=edit Rebased. To test: - Apply dependent patches: $ git bz apply 10617 $ git bz apply 10622 - Apply the patch, build package and install - Run $ service koha-common status Note: it can be tested just copying the debian/koha-common.init script to a server running koha-common instances and calling it $ ./koha-common.init status Sponsored-by: Universidad Nacional de Cordoba -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10624 --- Comment #4 from Robin Sheat <robin@catalyst.net.nz> --- This doesn't seem to work for me, and I can't immediately tell why: $ sudo koha-start-sip test Starting SIP server for test $ sudo ./koha-common.init status Zebra server running for instace test:. SIP server running for instace test: failed! $ ps ax|grep -i sip 32410 ? S 0:00 daemon --name=test-koha-sip --errlog=/var/log/koha/test/sip-error.log --stdout=/var/log/koha/test/sip.log --output=/var/log/koha/test/sip-output.log --verbose=1 --respawn --delay=30 --pidfiles=/var/run/koha/test --user=test-koha.test-koha -- perl /usr/share/koha/lib/C4/SIP/SIPServer.pm /etc/koha/sites/test/SIPconfig.xml 32411 ? S 0:00 perl /usr/share/koha/lib/C4/SIP/SIPServer.pm /etc/koha/sites/test/SIPconfig.xml 32412 ? S 0:00 perl /usr/share/koha/lib/C4/SIP/SIPServer.pm /etc/koha/sites/test/SIPconfig.xml any ideas? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10624 I'm just a bot <gitbot@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gitbot@bugs.koha-community. | |org When did the bot| |2013-09-24 last check this| | --- Comment #5 from I'm just a bot <gitbot@bugs.koha-community.org> --- Patch applied cleanly, go forth and signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10624 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #21242|0 |1 is obsolete| | --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 21513 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21513&action=edit Added the PID parameter to daemon as it failed to check SIP servers were running otherwise. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10624 --- Comment #7 from Robin Sheat <robin@catalyst.net.nz> --- $ sudo ./koha-common.init status Zebra server running for instace test:. SIP server running for instace test:. $ sudo kill 2170 2171 2179 $ sudo ./koha-common.init status Zebra server running for instace test:. SIP server running for instace test: failed! looks good. One note is that if you forget to use sudo, the error message is pretty obscure. We should probably fail cleaner. But that's not the fault of this. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10624 Robin Sheat <robin@catalyst.net.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=10624 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #21513|0 |1 is obsolete| | --- Comment #8 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 21706 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21706&action=edit Bug 10624: 'status' option switch for the packages init script This patch makes the init script return the status of the relevant processes. It relies on the koha-list switches added by 10622, and is written on top of the patch from 10617 that cleaned the init script. To test: - Apply the patch (+ 10622 so the SIP part works), build package and install - Run $ service koha-common status Note: it can be tested just copying the debian/koha-common.init script to a server running koha-common instances and calling it $ ./koha-common.init status If you don't have a patched koha-list command it will fail to report SIP servers status. Regards To+ Edit: added the PID parameter to daemon as it failed to check SIP servers were running otherwise. Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Robin Sheat <robin@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10624 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10624 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_3_14_candidate -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10624 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #9 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Tomás! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10624 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This patch has been pushed to 3.12.x, will be in 3.12.7. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org