[Bug 12856] New: koha-disable fails without disabling site
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 Bug ID: 12856 Summary: koha-disable fails without disabling site Change sponsored?: --- Product: Koha Version: 3.16 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Command-line Utilities Assignee: gmcharlt@gmail.com Reporter: koha@akafred.com QA Contact: testopia@bugs.koha-community.org When running 'koha-disable <instancename>' (eg. koha-disable myinstance) (on a fresh install of koha) I get: /usr/sbin/koha-disable: 35: [: =: argument expected
From what I can tell the site is never disabled.
See http://paste.koha-community.org/184 for a paste from running 'bash -x koha-disable". My guess is that this is caused by a reference to $instancename in the script (that is never set). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #1 from Mason James <mtj@kohaaloha.com> --- (In reply to koha from comment #0)
When running 'koha-disable <instancename>' (eg. koha-disable myinstance) (on a fresh install of koha) I get:
/usr/sbin/koha-disable: 35: [: =: argument expected
just a little update... the new 'shellshock patched' version of bash may have fixed this bug :) (thanks Liz!) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 --- Comment #2 from Mason James <mtj@kohaaloha.com> --- (In reply to Mason James from comment #1)
(In reply to koha from comment #0)
When running 'koha-disable <instancename>' (eg. koha-disable myinstance) (on a fresh install of koha) I get:
/usr/sbin/koha-disable: 35: [: =: argument expected
just a little update... the new 'shellshock patched' version of bash may have fixed this bug :)
(thanks Liz!)
oops!, Liz was saying that her patched bash still has this bug some good news, its working for me. :) i'll add some more info... root@xen1:~# koha-enable k1 Instance k1 already enabled. root@xen1:~# bash -x koha-disable k1 + set -e + '[' 1 -ge 1 ']' + restart_apache=no + for name in '"$@"' + is_instance k1 + local instancename=k1 + grep -q -x k1 + find /etc/koha/sites -mindepth 1 -maxdepth 1 -type d -printf '%f\n' + return 0 + disable_instance k1 + local instancename=k1 + is_enabled k1 + local instancename=k1 + is_instance k1 + local instancename=k1 + grep -q -x k1 + find /etc/koha/sites -mindepth 1 -maxdepth 1 -type d -printf '%f\n' + return 0 + grep -q '^[[:space:]]*Include /etc/koha/apache-shared-disable.conf' /etc/apache2/sites-available/k1 + return 0 + sed -i 's:^\s*#\(\s*Include /etc/koha/apache-shared-disable.conf\)$:\1:' /etc/apache2/sites-available/k1 + return 0 + restart_apache=yes + '[' yes = yes ']' + /etc/init.d/apache2 restart Restarting web server: apache2 ... waiting . + exit 0 root@xen1:~# koha-list --disabled k1 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 --- Comment #3 from Mason James <mtj@kohaaloha.com> ---
i'll add some more info...
this was run on a debian 7.6 box :) $ uname -a Linux xen1 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 --- Comment #4 from Mason James <mtj@kohaaloha.com> --- (In reply to Mason James from comment #3)
i'll add some more info...
this was run on a debian 7.6 box :)
$ uname -a Linux xen1 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux
...and some apache info too # dpkg -l|grep apache ii apache2 2.2.22-13+deb7u3 amd64 Apache HTTP Server metapackage -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 --- Comment #5 from Liz Rea <liz@catalyst.net.nz> --- Created attachment 32022 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32022&action=edit Bug 12856 - koha-disable fails without disabling site To test: Package up a branch with this patch install that package create a site - sudo koha-create --create-db testdisable enable a site - sudo koha-enable testdisable check it's enabled - sudo koha-list --enabled * it should show up disable a site - sudo koha-disable testdisable Do this for both debian squeeze/wheezy and ubuntu 12.04 and 14.04, if you can. I'd like to see a sign off from a debian (sq/wh)eez(e/y) or ubuntu 12 user, because I could only test reliably on ubuntu 14.04. * make sure apache restarts and no errors are produced check it's disabled - sudo koha-list --enabled * it should not show up check the site is still there - sudo koha-list * it should still be there check that the config file has the Include for disabling uncommented * the line Include /etc/koha/apache-shared-disable.conf should not have a # in front. Re-enable the site - sudo koha-enable testdisable * the line Include /etc/koha/apache-shared-disable.conf should have a # in front. And the final question - does the site work? All other functions unchanged? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |liz@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=12856 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #32022|0 |1 is obsolete| | --- Comment #6 from Liz Rea <liz@catalyst.net.nz> --- Created attachment 32023 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32023&action=edit Bug 12856 - koha-disable fails without disabling site To test: Package up a branch with this patch install that package create a site - sudo koha-create --create-db testdisable enable a site - sudo koha-enable testdisable check it's enabled - sudo koha-list --enabled * it should show up disable a site - sudo koha-disable testdisable Do this for both debian squeeze/wheezy and ubuntu 12.04 and 14.04, if you can. I'd like to see a sign off from a debian (sq/wh)eez(e/y) or ubuntu 12 user, because I could only test reliably on ubuntu 14.04. * make sure apache restarts and no errors are produced check it's disabled - sudo koha-list --enabled * it should not show up check the site is still there - sudo koha-list * it should still be there check that the config file has the Include for disabling uncommented * the line Include /etc/koha/apache-shared-disable.conf should not have a # in front. Re-enable the site - sudo koha-enable testdisable * the line Include /etc/koha/apache-shared-disable.conf should have a # in front. And the final question - does the site work? All other functions unchanged? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 Mason James <mtj@kohaaloha.com> 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=12856 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #32023|0 |1 is obsolete| | --- Comment #7 from Mason James <mtj@kohaaloha.com> --- Created attachment 32051 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32051&action=edit Bug 12856 - koha-disable fails without disabling site To test: Package up a branch with this patch install that package create a site - sudo koha-create --create-db testdisable enable a site - sudo koha-enable testdisable check it's enabled - sudo koha-list --enabled * it should show up disable a site - sudo koha-disable testdisable Do this for both debian squeeze/wheezy and ubuntu 12.04 and 14.04, if you can. I'd like to see a sign off from a debian (sq/wh)eez(e/y) or ubuntu 12 user, because I could only test reliably on ubuntu 14.04. * make sure apache restarts and no errors are produced check it's disabled - sudo koha-list --enabled * it should not show up check the site is still there - sudo koha-list * it should still be there check that the config file has the Include for disabling uncommented * the line Include /etc/koha/apache-shared-disable.conf should not have a # in front. Re-enable the site - sudo koha-enable testdisable * the line Include /etc/koha/apache-shared-disable.conf should have a # in front. And the final question - does the site work? All other functions unchanged? 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=12856 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 --- Comment #8 from Mason James <mtj@kohaaloha.com> ---
Do this for both debian squeeze/wheezy and ubuntu 12.04 and 14.04, if you can. I'd like to see a sign off from a debian (sq/wh)eez(e/y) or ubuntu 12 user, because I could only test reliably on ubuntu 14.04.
tested ok on debian wheezy -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |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=12856 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Severity|normal |blocker -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|3.16 |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #32051|0 |1 is obsolete| | --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 33996 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33996&action=edit [PASSED QA] Bug 12856: koha-disable fails without disabling site To test: Package up a branch with this patch install that package create a site - sudo koha-create --create-db testdisable enable a site - sudo koha-enable testdisable check it's enabled - sudo koha-list --enabled * it should show up disable a site - sudo koha-disable testdisable Do this for both debian squeeze/wheezy and ubuntu 12.04 and 14.04, if you can. I'd like to see a sign off from a debian (sq/wh)eez(e/y) or ubuntu 12 user, because I could only test reliably on ubuntu 14.04. * make sure apache restarts and no errors are produced check it's disabled - sudo koha-list --enabled * it should not show up check the site is still there - sudo koha-list * it should still be there check that the config file has the Include for disabling uncommented * the line Include /etc/koha/apache-shared-disable.conf should not have a # in front. Re-enable the site - sudo koha-enable testdisable * the line Include /etc/koha/apache-shared-disable.conf should have a # in front. And the final question - does the site work? All other functions unchanged? Signed-off-by: Mason James <mtj@kohaaloha.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Works as expected. code reads better too. Edit: I added a missing space in one line. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Liz! PS: It makes errors rise on instance creation! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 --- Comment #11 from Liz Rea <liz@catalyst.net.nz> --- Hi Tomas, Are the errors something I should be concerned about in relation to this problem? Liz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Liz Rea from comment #11)
Hi Tomas,
Are the errors something I should be concerned about in relation to this problem?
Nope. It only happens if you use --request-db: in the last step it calls koha-disable... but the rest is ok. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_3_16_candidate -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 --- Comment #13 from Mason James <mtj@kohaaloha.com> --- (In reply to Tomás Cohen Arazi from comment #10)
Patch pushed to master.
Pushed to 3.16.x, patch will be in 3.16.8 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12856 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_3_16_candidate |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=12856 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolyn.somers@biblibre.co | |m Depends on| |11404 --- Comment #14 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Depends on Bug 11404 that adds $instancefile -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org