Summary: | The installer does not output the result of the update using Plack | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | dpavlin, m.de.rooy, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 13791, 19756 | ||
Attachments: |
Bug 13793: Make the installer output the result of the updates under Plack
Bug 13793: Make the installer output the result of the updates under Plack Bug 13793: Make the installer output the result of the updates under Plack |
Description
Jonathan Druart
2015-03-04 10:50:46 UTC
Created attachment 36454 [details] [review] Bug 13793: Make the installer output the result of the updates under Plack Test plan: 0/ Start plack for intranet 1/ Create a new entry in updatedatabase.pl, something like: $DBversion = "3.19.00.013"; if(CheckVersion($DBversion)) { print "Upgrade to $DBversion done (Bug test plack - This is a est)\n"; print "Upgrade to $DBversion done (Bug test plack - This is anoter est)\n"; print "Upgrade to $DBversion done (Bug test plack - This is a third est)\n"; warn "this is an error"; } and modify the kohaversion.pl accordingly. You can also warn something to simulate an error. 2/ Go on the mainpage (or wherever you want), you should be redirected to the installer 3/ Notice that the output of the updatedatabase is displayed on the screen. 4/ Confirm that new files have been created in your Koha log directory (check the logdir entry in your koha conf file). 5/ Confirm that the output is still displayed without Plack. Created attachment 36546 [details] [review] Bug 13793: Make the installer output the result of the updates under Plack Test plan: 0/ Start plack for intranet 1/ Create a new entry in updatedatabase.pl, something like: $DBversion = "3.19.00.013"; if(CheckVersion($DBversion)) { print "Upgrade to $DBversion done (Bug test plack - This is a est)\n"; print "Upgrade to $DBversion done (Bug test plack - This is anoter est)\n"; print "Upgrade to $DBversion done (Bug test plack - This is a third est)\n"; warn "this is an error"; } and modify the kohaversion.pl accordingly. You can also warn something to simulate an error. 2/ Go on the mainpage (or wherever you want), you should be redirected to the installer 3/ Notice that the output of the updatedatabase is displayed on the screen. 4/ Confirm that new files have been created in your Koha log directory (check the logdir entry in your koha conf file). 5/ Confirm that the output is still displayed without Plack. Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org> Created attachment 36657 [details] [review] Bug 13793: Make the installer output the result of the updates under Plack Test plan: 0/ Start plack for intranet 1/ Create a new entry in updatedatabase.pl, something like: $DBversion = "3.19.00.013"; if(CheckVersion($DBversion)) { print "Upgrade to $DBversion done (Bug test plack - This is a est)\n"; print "Upgrade to $DBversion done (Bug test plack - This is anoter est)\n"; print "Upgrade to $DBversion done (Bug test plack - This is a third est)\n"; warn "this is an error"; } and modify the kohaversion.pl accordingly. You can also warn something to simulate an error. 2/ Go on the mainpage (or wherever you want), you should be redirected to the installer 3/ Notice that the output of the updatedatabase is displayed on the screen. 4/ Confirm that new files have been created in your Koha log directory (check the logdir entry in your koha conf file). 5/ Confirm that the output is still displayed without Plack. Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org> Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Patch pushed to master. Thanks Jonathan! With this patch I can't run the web installer in my dev installation. Following error is displayed: Cannot open log file /home/katrin/koha-dev/var/log/updatedatabase_2015-03-15T21:59:53.log: No such file or directory at /home/katrin/kohaclone/installer/install.pl line 332. After reverting the patch the update process is completed normally. Katrin, i tested both with and without plack on a regular dev install before pushing. Please share some details about your directory structure and permission. Sure, it might be my installation, but I thought it would be better to have someone check. This is a standard dev installation. The logs are being written to /home/katrin/koha-dev/var/log The files within the directory currently are: -rw-r--r-- 1 root root 436429 Mär 15 23:11 koha-error_log -rw-r--r-- 1 root root 98095 Mär 6 14:55 koha-opac-error_log -rw-r--r-- 1 katrin katrin 3657 Mär 15 02:46 koha-zebradaemon.err -rw-r--r-- 1 katrin katrin 13428 Mär 15 23:19 koha-zebradaemon-output.log I am not sure why there is a mix of root/katrin. Writing to the existing files seems to work alright. And permissions on the directory itself: drwxr-xr-x 2 katrin katrin 4096 Mär 15 23:45 log Cannot open log file /usr/share/kohadev/testclone/var/log/updatedatabase_2015-03-16T09:42:31.log: No such file or directory at /usr/share/koha/testclone/installer/install.pl line 332. If I update via the webinstaller, the apache user has no permission to write a new log file in that directory. Mar 19 09:40:31 kernel: type=1400 audit(): avc: denied { write } for pid=14194 comm="sh" name="log" dev="md2" ino=11150563 scontext=system_u:system_r:httpd_sys_script_t:s0 tcontext=unconfined_u:object_r:httpd_log_t:s0 tclass=dir If I set the permission of this log folder to 777 (which I do not like!), I stumble over my next security measure: SELinux. That's good :) I can go further and add exceptions for that too of course. But I think we are working in the wrong direction. Can we REVERT this patch please? The patch is meant for Plack users. Please write it so that non-Plack users are not affected. See bug 13876 for a fix. |