Summary: | Can't access MARC bibliographic frameworks and other pages | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | Architecture, internals, and plumbing | Assignee: | Robin Sheat <robin> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | abl, gmcharlt, robin, 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: | 11842 | ||
Bug Blocks: | 13431 | ||
Attachments: |
Bug 12800: running unit tests that use Koha::Cache breaks cache usage from Apache
Bug 12800: running unit tests that use Koha::Cache breaks cache usage from Apache [PASSED QA] Bug 12800: running unit tests that use Koha::Cache breaks cache usage from Apache |
Description
Katrin Fischer
2014-08-21 07:34:05 UTC
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. |