When trying to access Administration > MARC bilbiographic frameworks, following perl error message is shown: Open of share file /tmp/sharefile-koha-koha failed: Permission denied at /usr/lib/perl5/Cache/FastMmap.pm line 640. It seems to be related to the changes done for bug 11842. Without the patch I can access the page without problem.
Same happens when you try to access the Koha to MARC mapping page.
... or the catalog detail page?
Ok, this seems a bit specific to my installation - downgrading severity. With help of Jonathan we tried following, both fixed the problem: - removing libcache-fastmmap-perl - also, reinstalling the module and deleting /tmp/sharefile-koha-*
The problem reoccured with the module installed and after having deleted the /tmp files. This time I couldn't run a unit test file and the error message was shown.
Created attachment 31066 [details] [review] Bug 12800: running unit tests that use Koha::Cache breaks cache usage from Apache If the user runs: $ prove t/Cache.t with it's system user, two situations can happen: 1) If MEMCACHED_NAMESPACE is set on koha-httpd.xml other than the default 'koha', then Apache sets /tmp/sharefile-koha-<namespace> and the problem is not present: running the test creates /tmp/sharefile-koha-koha != /tmp/sharefile-koha-<namespace> => SUCCESS: no problem 2) If MEMCACHED_NAMESPACE is not set (or eq 'koha'), then there is a permission problem either running the unit tests, or when using any funcitonality on the UI that needs Koha::Cache. Explanation: the one that is run first will set the /tmp/sharefile-koha-koha ownership so it will be either the dev's sys user, or www-data (or whatever apache is using). This patch sets a namespace for the unit tests, so there is no collision. To test: - On your dev setup, having MEMCACHED_NAMESPACE unset on koha-httpd.conf - Edit a marc framework. If it fails, remove /tmp/sharefile-koha-koha, and try again -> fixed. Now try running $ prove t/Cache.t => FAIL: test fails because of permission problem - Apply the patch - Re-run the test => SUCCESS: test passes Try changing the order, etc. The temporary file that is used is deleted after the tests are run. Sponsored-by: Universidad Nacional de Cordoba
Created attachment 31067 [details] [review] Bug 12800: running unit tests that use Koha::Cache breaks cache usage from Apache If the user runs: $ prove t/Cache.t with it's system user, two situations can happen: 1) If MEMCACHED_NAMESPACE is set on koha-httpd.xml other than the default 'koha', then Apache sets /tmp/sharefile-koha-<namespace> and the problem is not present: running the test creates /tmp/sharefile-koha-koha != /tmp/sharefile-koha-<namespace> => SUCCESS: no problem 2) If MEMCACHED_NAMESPACE is not set (or eq 'koha'), then there is a permission problem either running the unit tests, or when using any funcitonality on the UI that needs Koha::Cache. Explanation: the one that is run first will set the /tmp/sharefile-koha-koha ownership so it will be either the dev's sys user, or www-data (or whatever apache is using). This patch sets a namespace for the unit tests, so there is no collision. To test: - On your dev setup, having MEMCACHED_NAMESPACE unset on koha-httpd.conf - Edit a marc framework. If it fails, remove /tmp/sharefile-koha-koha, and try again -> fixed. Now try running $ prove t/Cache.t => FAIL: test fails because of permission problem - Apply the patch - Re-run the test => SUCCESS: test passes Try changing the order, etc. The temporary file that is used is deleted after the tests are run. Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Created attachment 31101 [details] [review] [PASSED QA] Bug 12800: running unit tests that use Koha::Cache breaks cache usage from Apache If the user runs: $ prove t/Cache.t with it's system user, two situations can happen: 1) If MEMCACHED_NAMESPACE is set on koha-httpd.xml other than the default 'koha', then Apache sets /tmp/sharefile-koha-<namespace> and the problem is not present: running the test creates /tmp/sharefile-koha-koha != /tmp/sharefile-koha-<namespace> => SUCCESS: no problem 2) If MEMCACHED_NAMESPACE is not set (or eq 'koha'), then there is a permission problem either running the unit tests, or when using any funcitonality on the UI that needs Koha::Cache. Explanation: the one that is run first will set the /tmp/sharefile-koha-koha ownership so it will be either the dev's sys user, or www-data (or whatever apache is using). This patch sets a namespace for the unit tests, so there is no collision. To test: - On your dev setup, having MEMCACHED_NAMESPACE unset on koha-httpd.conf - Edit a marc framework. If it fails, remove /tmp/sharefile-koha-koha, and try again -> fixed. Now try running $ prove t/Cache.t => FAIL: test fails because of permission problem - Apply the patch - Re-run the test => SUCCESS: test passes Try changing the order, etc. The temporary file that is used is deleted after the tests are run. Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Patch pushed to master.