Bug 21426 - setting USE_MEMCACHED to "no" in koha-sites.conf does not have any effect
Summary: setting USE_MEMCACHED to "no" in koha-sites.conf does not have any effect
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (command-line installer) (show other bugs)
Version: Main
Hardware: All All
: P3 trivial
Assignee: Andreas Roussos
QA Contact: Testopia
URL:
Keywords:
Depends on: 18342
Blocks:
  Show dependency treegraph
 
Reported: 2018-09-27 11:29 UTC by Andreas Roussos
Modified: 2019-10-14 19:57 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 21426: setting USE_MEMCACHED to "no" in koha-sites.conf does not have any effect (1.47 KB, patch)
2018-09-27 11:44 UTC, Andreas Roussos
Details | Diff | Splinter Review
Bug 21426: setting USE_MEMCACHED to "no" in koha-sites.conf does not have any effect (1.53 KB, patch)
2018-09-28 17:30 UTC, Pierre-Marc Thibault
Details | Diff | Splinter Review
[ALTERNATIVE-PATCH] Bug 21426: Handle USE_MEMCACHED=no in koha-create (828 bytes, patch)
2018-09-29 18:17 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21426: Handle USE_MEMCACHED=no in koha-create (806 bytes, patch)
2018-09-30 20:20 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21426: Handle USE_MEMCACHED=no in koha-create (1.11 KB, patch)
2018-10-01 14:30 UTC, Andreas Roussos
Details | Diff | Splinter Review
Bug 21426: Handle USE_MEMCACHED=no in koha-create (1.16 KB, patch)
2018-10-08 21:04 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Roussos 2018-09-27 11:29:54 UTC
I recently set up a new Koha 18.05 instance for testing and decided
not to use memcached. So, in /etc/koha/koha-sites.conf I set the
USE_MEMCACHED variable to "no" and ran `koha-create --create-db dev`.

Oddly enough, once my instance was up and running I noticed that a
memcached process had been started (Home > About Koha in the Staff
interface also reported memcached as running).

Apparently, setting USE_MEMCACHED to "no" does no longer have any
effect because (as of Bug 18342) memcached is enabled by default
for new installs.
Comment 1 Andreas Roussos 2018-09-27 11:44:59 UTC
Created attachment 79481 [details] [review]
Bug 21426: setting USE_MEMCACHED to "no" in koha-sites.conf does not have any effect

Setting USE_MEMCACHED to "no" in /etc/koha/koha-sites.conf does not
have any effect, because as of Bug 18342 memcached is enabled by
default for new installations.

With the proposed patch this potential source of confusion is removed
from the configuration file.

Test plan:
1) view koha-sites.conf and notice that you are given the option to
   set USE_MEMCACHED to either "yes" or "no" (the default being "yes")
2) apply the patch
3) this time the "Memcached global configuration variables" section
   should point out that new instances will use memcached by default
Comment 2 Pierre-Marc Thibault 2018-09-28 17:30:28 UTC
Created attachment 79603 [details] [review]
Bug 21426: setting USE_MEMCACHED to "no" in koha-sites.conf does not have any effect

Setting USE_MEMCACHED to "no" in /etc/koha/koha-sites.conf does not
have any effect, because as of Bug 18342 memcached is enabled by
default for new installations.

With the proposed patch this potential source of confusion is removed
from the configuration file.

Test plan:
1) view koha-sites.conf and notice that you are given the option to
   set USE_MEMCACHED to either "yes" or "no" (the default being "yes")
2) apply the patch
3) this time the "Memcached global configuration variables" section
   should point out that new instances will use memcached by default

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Comment 3 Jonathan Druart 2018-09-29 18:16:37 UTC
I am wondering if this is the right fix, I guess we should handle the "no" value instead.
Comment 4 Jonathan Druart 2018-09-29 18:17:35 UTC
Created attachment 79617 [details] [review]
[ALTERNATIVE-PATCH] Bug 21426: Handle USE_MEMCACHED=no in koha-create
Comment 5 Jonathan Druart 2018-09-29 18:18:19 UTC
What about this alternative patch?
Comment 6 Andreas Roussos 2018-09-30 19:10:46 UTC
(In reply to Jonathan Druart from comment #3)
> I am wondering if this is the right fix, I guess we should handle the "no"
> value instead.
Fine with me :-) FWIW my interpretation of the changes and comments in
Bug 18342 was that it would no longer be possible to create an install
without memcached, and I based my patch on that. I'll obsolete it now.

(In reply to Jonathan Druart from comment #5)
> What about this alternative patch?
Looks OK overall; is the echo bit above the if statement intentional?
Comment 7 Jonathan Druart 2018-09-30 20:20:07 UTC
Created attachment 79660 [details] [review]
Bug 21426: Handle USE_MEMCACHED=no in koha-create
Comment 8 Jonathan Druart 2018-09-30 20:21:03 UTC
(In reply to Andreas Roussos from comment #6)
> (In reply to Jonathan Druart from comment #5)
> > What about this alternative patch?
> Looks OK overall; is the echo bit above the if statement intentional?

Of course no, I amended the patch.
Comment 9 Andreas Roussos 2018-10-01 14:15:29 UTC
(In reply to Andreas Roussos from comment #0)
> Oddly enough, once my instance was up and running I noticed that a
> memcached process had been started (Home > About Koha in the Staff
> interface also reported memcached as running).
Actually, the memcached process had been there all along. The daemon
is set to start automatically for runlevel 3 ('multi-user.target' in
systemd-speak).
Comment 10 Andreas Roussos 2018-10-01 14:30:25 UTC
Created attachment 79718 [details] [review]
Bug 21426: Handle USE_MEMCACHED=no in koha-create

Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Works as intended. I've set USE_MEMCACHED to "no" and created a new
Koha instance. Home > About now reports this information: Memcached:
Servers: undefined | Namespace: undefined | Status: unknown | Config
read from: Nowhere [...] | Effective caching method: Cache::Memory
Comment 11 Chris Cormack 2018-10-08 21:04:52 UTC
Created attachment 80238 [details] [review]
Bug 21426: Handle USE_MEMCACHED=no in koha-create

Signed-off-by: Andreas Roussos <arouss1980@gmail.com>

Works as intended. I've set USE_MEMCACHED to "no" and created a new
Koha instance. Home > About now reports this information: Memcached:
Servers: undefined | Namespace: undefined | Status: unknown | Config
read from: Nowhere [...] | Effective caching method: Cache::Memory

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 12 Nick Clemens (kidclamp) 2018-10-09 16:23:56 UTC
Awesome work all!

Pushed to master for 18.11
Comment 13 Martin Renvoize (ashimema) 2018-10-15 13:38:59 UTC
Pushed to 18.05.x for 18.05.05
Comment 14 Fridolin Somers 2018-11-09 07:13:34 UTC
Depends on Bug 18342 not in 17.11.x