[Bug 10104] New: koha-disable error handling
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10104 Bug ID: 10104 Summary: koha-disable error handling Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Packaging Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com CC: robin@catalyst.net.nz Make koha-disable handle errors more gracefully. Also make it support more than one instance as parameter (there is a for loop, but a previous check prevents it to work). -- 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=10104 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Blocks| |4876 Change sponsored?|--- |Sponsored 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=10104 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 17626 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17626&action=edit Bug 10104 - make koha-disable more robust koha-disable now: - checks for the existence of the instance before any actions on it. - checks if the instance is already disabled before touching anything (warns otherwise) - only reloads apache if needed - handles more than one instance name. - changed the docs to acknowledge the previous item. To test: - Apply the patch, build your package - Run koha-disable on - Non existent instance (try names that are prefix and suffix of a valid one too please) - Already disabled instance name. - Enabled instance name. It should work as expected and warn the user on the expected wrong cases. Regards To+ Sponsored-by: Universidad Nacional de Córdoba -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10104 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10104 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- Testing now On a disabled instance sudo ./debian/scripts/koha-disable persona Instance persona already disabled. On an unknown instance sudo ./debian/scripts/koha-disable pers Unknown instance pers. On an enabled instance sudo ./debian/scripts/koha-disable persona [....] Restarting web server: apache2 ok Looks all good to me, I confirm its disabled. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10104 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #17626|0 |1 is obsolete| | Status|Needs Signoff |Signed Off Assignee|tomascohen@gmail.com |chris@bigballofwax.co.nz --- Comment #3 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 17775 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17775&action=edit Signed off patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10104 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #4 from Mason James <mtj@kohaaloha.com> --- a small QA question, this patch breaks the default 'usage' message, when no arg is passed - is this intended? -[ "$#" = 1 ] || die "Usage: $0 instancename..." +[ "$#" > 1 ] || die "Usage: $0 instancename..." (this is the same issue as bug-10101) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10104 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 17812 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17812&action=edit Bug 10104 - Followup: fix param check As noted by Mason on bug 10101, the check was not working for zero arguments. Sponsored-by: Universidad Nacional de Córdoba -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10104 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10104 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #6 from Chris Cormack <chris@bigballofwax.co.nz> --- sudo ./debian/scripts/koha-disable Disables Koha instances. Usage: ./debian/scripts/koha-disable instancename1 instancename2... Missing instance name... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10104 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #17812|0 |1 is obsolete| | --- Comment #7 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 17819 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17819&action=edit Follow up signed off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10104 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #17775|0 |1 is obsolete| | --- Comment #8 from Mason James <mtj@kohaaloha.com> --- Created attachment 17837 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17837&action=edit Bug 10104 - make koha-disable more robust koha-disable now: - checks for the existence of the instance before any actions on it. - checks if the instance is already disabled before touching anything (warns otherwise) - only reloads apache if needed - handles more than one instance name. - changed the docs to acknowledge the previous item. To test: - Apply the patch, build your package - Run koha-disable on - Non existent instance (try names that are prefix and suffix of a valid one too please) - Already disabled instance name. - Enabled instance name. It should work as expected and warn the user on the expected wrong cases. 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> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10104 Mason James <mtj@kohaaloha.com> 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=10104 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #17819|0 |1 is obsolete| | --- Comment #9 from Mason James <mtj@kohaaloha.com> --- Created attachment 17838 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17838&action=edit Bug 10104 - Followup: fix param check As noted by Mason on bug 10101, the check was not working for zero arguments. Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Mason James <mtj@kohaaloha.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10104 --- Comment #10 from Mason James <mtj@kohaaloha.com> --- (In reply to comment #7)
Created attachment 17819 [details] [review] Follow up signed off
Chris, i think you forgot to add a sign-off line to your uploaded patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10104 --- Comment #11 from Mason James <mtj@kohaaloha.com> ---
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 2 patches -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10104 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #12 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master and 3.12.x. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10104 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10104 --- Comment #13 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.10.x will be in 3.10.6 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org