Summary: | koha-disable fails without disabling site | ||
---|---|---|---|
Product: | Koha | Reporter: | koha |
Component: | Command-line Utilities | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | blocker | ||
Priority: | P5 - low | CC: | fridolin.somers, liz, mtj, robin, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 11404 | ||
Bug Blocks: | |||
Attachments: |
Bug 12856 - koha-disable fails without disabling site
Bug 12856 - koha-disable fails without disabling site Bug 12856 - koha-disable fails without disabling site [PASSED QA] Bug 12856: koha-disable fails without disabling site |
Description
koha
2014-09-01 13:26:47 UTC
(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!) (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 > 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
(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 Created attachment 32022 [details] [review] 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? Created attachment 32023 [details] [review] 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? Created attachment 32051 [details] [review] 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> > 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
Created attachment 33996 [details] [review] [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. Patch pushed to master. Thanks Liz! PS: It makes errors rise on instance creation! Hi Tomas, Are the errors something I should be concerned about in relation to this problem? Liz (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. (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 Depends on Bug 11404 that adds $instancefile |