[Bug 10733] New: Memcached on package installs
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 Bug ID: 10733 Summary: Memcached on package installs Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Packaging Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz We should provide a proper way of configuring the use of memcached on packages setups. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 20354 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20354&action=edit Bug 10733 - Memcached on package installs This patch makes the koha-create script adjust the koha-conf.xml file with the proper string substitutions to enable the use of memcached for the created Koha instance. It adds three option switches that control this: --use-memcached (defaults to "no") --memcached-servers "host1:port1,..." (defaults to 127.0.0.1:11211) --memcached-namespace "desired_namespace" (defaults to koha_${instance}) Note: the docs discourage setting user's own namespace. Using memcached is off as the default. The relevant configuration variables will remain empty if the user doesn't pass --use-memcached to the command. It matches the current behaviour. To test: - Apply the patch - Build your own packages and install them on a test server a) Create a new instance without using the new switches like: $ koha-create --create-db memctest - Check that /etc/koha/sites/memctest/koha-conf.xml contains: * Empty <memcached_servers> tag. * Empty <memcached_namespace> tag. b) Play with the possible combination of option switches (Note that the code defaults to empty and will remain like that if --use-memcached is not used, so less tests...) $ koha-create --create-db --use-memcached memctest $ koha-create --create-db --use-memcached --memcached-servers "anything:xxx" memctest $ koha-create --create-db --use-memcached --memcached-servers "anything:xxx" --memcached-namespace "something" memctest $ koha-create --create-db --use-memcached --memcached-namespace "something" memctest - Check the koha-conf.xml file reflects the chosen options. c) Run $ koha-create --help - It should advertise this addition accordingly. d) Run $ man koha-create - Man page for koha-create should provide good information on the new switches behaviour Enjoy To+ Sponsored-by: Universidad Nacional de Cordoba -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #20354|0 |1 is obsolete| | --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 20356 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20356&action=edit Removed some cruft from other tries. Enjoy To+ Sponsored-by: Universidad Nacional de Cordoba -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #20356|0 |1 is obsolete| | --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 20357 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20357&action=edit Bug 10733: Memcached on package installs This patch makes the koha-create script adjust the koha-conf.xml file with the proper string substitutions to enable the use of memcached for the created Koha instance. It adds three option switches that control this: --use-memcached (defaults to "no") --memcached-servers "host1:port1,..." (defaults to 127.0.0.1:11211) --memcached-namespace "desired_namespace" (defaults to koha_${instance}) Note: the docs discourage setting user's own namespace. Using memcached is off as the default. The relevant configuration variables will remain empty if the user doesn't pass --use-memcached to the command. It matches the current behaviour. To test: - Apply the patch - Build your own packages and install them on a test server a) Create a new instance without using the new switches like: $ koha-create --create-db memctest - Check that /etc/koha/sites/memctest/koha-conf.xml contains: * Empty <memcached_servers> tag. * Empty <memcached_namespace> tag. b) Play with the possible combination of option switches (Note that the code defaults to empty and will remain like that if --use-memcached is not used, so less tests...) $ koha-create --create-db --use-memcached memctest $ koha-create --create-db --use-memcached --memcached-servers "anything:xxx" memctest $ koha-create --create-db --use-memcached --memcached-servers "anything:xxx" --memcached-namespace "something" memctest $ koha-create --create-db --use-memcached --memcached-namespace "something" memctest - Check the koha-conf.xml file reflects the chosen options. c) Run $ koha-create --help - It should advertise this addition accordingly. d) Run $ man koha-create - Man page for koha-create should provide good information on the new switches behaviour Enjoy To+ Sponsored-by: Universidad Nacional de Cordoba -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 20358 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20358&action=edit Bug 10733: add 'memcached' as suggested dependency Adds 'memcached' to the control.in file so the user is suggested by apt to install it. Sponsored-by: Universidad Nacional de Cordoba -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 --- Comment #5 from Robin Sheat <robin@catalyst.net.nz> --- I wonder if it should also listen to koha-sites for its default. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Robin Sheat from comment #5)
I wonder if it should also listen to koha-sites for its default.
It does Robin. But it is not advertised. Maybe I should change MEMCACHED_NAMESPACE for MEMCACHED_PREFFIX. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 20365 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20365&action=edit Bug 10733: Follow-up - use koha-sites.conf In order to respect the current schema, where configuration values are pondered like this: hardcoded < koha-sites.conf < koha-create option switches I changed the patch a bit. I even changed MEMCACHED_NAMESPACE for MEMCACHED_PREFIX that seems to fit better in the current schema. Any feedback is welcome. Regards To+ Sponsored-by: Universidad Nacional de Cordoba -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 20544 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20544&action=edit Bug 10733: Follow-up - Forgot apache-site.conf.in I just forgot to put the SetEnv definitions there. Regards To+ Sponsored-by: Universidad Nacional de Cordoba -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #20357|0 |1 is obsolete| | Attachment #20365|0 |1 is obsolete| | Attachment #20544|0 |1 is obsolete| | --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 20996 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20996&action=edit Bug 10733: Memcached on package installs This patch makes the koha-create script adjust the koha-conf.xml file with the proper string substitutions to enable the use of memcached for the created Koha instance. It adds three option switches that control this: --use-memcached (defaults to "no") --memcached-servers "host1:port1,..." (defaults to '127.0.0.1:11211') --memcached-prefix "desired_namespace prefix" (defaults to 'koha_') It respects the current schema configuration schema, where configuration values are pondered like this: hardcoded < koha-sites.conf < koha-create option switches koha-sites.conf is read for USE_MEMCACHED, MEMCACHED_SERVERS and MEMCACHED_PREFIX. Note: the docs discourage setting user's own namespace prefix. Using memcached is off as the default. The relevant configuration variables will remain empty if the user doesn't pass --use-memcached to the command. It matches the current behaviour. To test: - Apply the patch - Build your own packages and install them on a test server a) Create a new instance without using the new switches like: $ koha-create --create-db memctest - Check that /etc/koha/sites/memctest/koha-conf.xml contains: * Empty <memcached_servers> tag. * Empty <memcached_namespace> tag. b) Play with the possible combination of option switches (Note that the code defaults to empty and will remain like that if --use-memcached is not used, so less tests...) $ koha-create --create-db --use-memcached memctest $ koha-create --create-db --use-memcached --memcached-servers "anything:xxx" memctest $ koha-create --create-db --use-memcached --memcached-servers "anything:xxx" --memcached-namespace "something" memctest $ koha-create --create-db --use-memcached --memcached-namespace "something" memctest - Check the koha-conf.xml and /etc/apache2/sites-enabled/memctest file reflect the chosen options. c) Run $ koha-create --help - It should advertise this addition accordingly. d) Run $ man koha-create - Man page for koha-create should provide good information on the new switches behaviour Enjoy To+ Sponsored-by: Universidad Nacional de Cordoba -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Please note I forgot to fix the commit message and --memcached-namespace is no longer the option switch but --memcached-prefix. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #11 from M. Tompsett <mtompset@hotmail.com> --- Perhaps some QA people might be able to comment on the parsing or lack of parsing for the --memcached-servers parameter. SetEnv MEMCACHED_SERVERS "machinea:9671111" Does that make sense?! BTW, 967-1111 is Pizza pizza's phone number (www.pizzapizza.ca). ;) Should the string be parsed and validated? Now to re-test this squashed version. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 --- Comment #12 from M. Tompsett <mtompset@hotmail.com> --- Test cases 2, 4, and 6 all result in blank results, though that may not be expected. After brief discussions on the IRC channel (http://irc.koha-community.org/koha/2013-09-12#i_1382768), I think adding an error message and failing is probably best. As such, I've held off on signing. Hope this feedback is helpful. :) sudo koha-create --create-db memctest0 sudo grep -i memcache /etc/apache2/sites-available/memctest0 sudo grep -i memcache /etc/koha/sites/memctest0/koha-conf.xml RESULTS: Blank as expected sudo koha-create --create-db memctest1 --use-memcached sudo grep -i memcache /etc/apache2/sites-available/memctest1 sudo grep -i memcache /etc/koha/sites/memctest1/koha-conf.xml RESULTS: 127.0.0.1:11211 used for server, namespace is koha_memctest1 All as expected sudo koha-create --create-db memctest2 --memcached-servers "machinea:911" sudo grep -i memcache /etc/apache2/sites-available/memctest2 sudo grep -i memcache /etc/koha/sites/memctest2/koha-conf.xml RESULTS: All blank. I'm not sure what to expect, since the --memcached-servers implies --use-memcached. I was thinking an error message say missing parameter --use-memcached? sudo koha-create --create-db memctest3 --use-memcached --memcached-servers "machinea:911" sudo grep -i memcache /etc/apache2/sites-available/memctest3 sudo grep -i memcache /etc/koha/sites/memctest3/koha-conf.xml RESULTS: machinea:911 used for server, namespace is koha_memctest4 All as expected. sudo koha-create --create-db memctest4 --memcached-prefix "test_" sudo grep -i memcache /etc/apache2/sites-available/memctest4 sudo grep -i memcache /etc/koha/sites/memctest4/koha-conf.xml RESULTS: All blank. I'm not sure what to expect, since the --memcached-prefix implies --use-memcached. I was thinking an error message say missing parameter --use-memcached? sudo koha-create --create-db memctest5 --use-memcached --memcached-prefix "test_" sudo grep -i memcache /etc/apache2/sites-available/memctest5 sudo grep -i memcache /etc/koha/sites/memctest5/koha-conf.xml RESULTS: 127.0.0.1:11211 used for server, namespace is test_memctest5 All as expected sudo koha-create --create-db memctest6 --memcached-servers "machinea:911" --memcached-prefix "test_" sudo grep -i memcache /etc/apache2/sites-available/memctest6 sudo grep -i memcache /etc/koha/sites/memctest6/koha-conf.xml RESULTS: All blank. I'm not sure what to expect, since the parameters both imply --use-memcached. I was thinking an error message say missing parameter --use-memcached? sudo koha-create --create-db memctest7 --use-memcached --memcached-servers "machinea:911" --memcached-prefix "test_" sudo grep -i memcache /etc/apache2/sites-available/memctest7 sudo grep -i memcache /etc/koha/sites/memctest7/koha-conf.xml RESULTS: machinea:911 used for server, namespace is test_memctest7 All as expected -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #20996|0 |1 is obsolete| | --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 21055 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21055&action=edit Bug 10733: Memcached on package installs This patch makes the koha-create script adjust the koha-conf.xml file with the proper string substitutions to enable the use of memcached for the created Koha instance. It adds three option switches that control this: --use-memcached (defaults to "no") --memcached-servers "host1:port1,..." (defaults to '127.0.0.1:11211') --memcached-prefix "desired_namespace prefix" (defaults to 'koha_') It respects the current schema configuration schema, where configuration values are pondered like this: hardcoded < koha-sites.conf < koha-create option switches koha-sites.conf is read for USE_MEMCACHED, MEMCACHED_SERVERS and MEMCACHED_PREFIX. Note: the docs discourage setting user's own namespace prefix. Using memcached is off as the default. The relevant configuration variables will remain empty if the user doesn't pass --use-memcached to the command. It matches the current behaviour. To test: - Apply the patch - Build your own packages and install them on a test server a) Create a new instance without using the new switches like: $ koha-create --create-db memctest - Check that /etc/koha/sites/memctest/koha-conf.xml contains: * Empty <memcached_servers> tag. * Empty <memcached_namespace> tag. b) Play with the possible combination of option switches (Note that the code defaults to empty and will remain like that if --use-memcached is not used, so less tests...) $ koha-create --create-db --use-memcached memctest $ koha-create --create-db --use-memcached --memcached-servers "anything:xxx" memctest $ koha-create --create-db --use-memcached --memcached-servers "anything:xxx" --memcached-prefix "something" memctest $ koha-create --create-db --use-memcached --memcached-prefix "something" memctest - Check the koha-conf.xml and /etc/apache2/sites-enabled/memctest file reflect the chosen options. c) Run $ koha-create --help - It should advertise this addition accordingly. d) Run $ man koha-create - Man page for koha-create should provide good information on the new switches behaviour Enjoy To+ Sponsored-by: Universidad Nacional de Cordoba -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 21085 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21085&action=edit Bug 10733: Follow up - unset variables from koha-sites.conf if USE_MEMCACHED=no As configuration variables from koha-sites.conf overwrite the ones in the koha-create script we need to unset them in case we have USE_MEMCACHED="no". Regards To+ Sponsored-by: Universidad Nacional de Cordoba -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 --- Comment #15 from M. Tompsett <mtompset@hotmail.com> --- I generated a generic koha-sites.conf: DOMAIN=".myDNSname.org" # Change this to be your domain. INTRAPORT="80" INTRAPREFIX="" INTRASUFFIX="-intra" DEFAULTSQL="" OPACPORT="80" OPACPREFIX="" OPACSUFFIX="" ZEBRA_MARC_FORMAT="marc21" ZEBRA_LANGUAGE="en" # Create 0-7 based on this binary scheme. Similar to command-line cases. USE_MEMCACHED="no" # no=0, yes=1 MEMCACHED_SERVERS="" # ""=0, "machinea:911"=1 MEMCACHED_PREFIX="" # ""=0, "test_"=1 My test cases that I started with, but haven't had a chance to restart: sudo cp /etc/koha/koha-sites.conf_0 /etc/koha/koha-sites.conf sudo koha-create --create-db memctest0 sudo grep -i memcache /etc/apache2/sites-available/memctest0 sudo grep -i memcache /etc/koha/sites/memctest0/koha-conf.xml sudo cp /etc/koha/koha-sites.conf_1 /etc/koha/koha-sites.conf sudo koha-create --create-db memctest1 sudo grep -i memcache /etc/apache2/sites-available/memctest1 sudo grep -i memcache /etc/koha/sites/memctest1/koha-conf.xml sudo cp /etc/koha/koha-sites.conf_2 /etc/koha/koha-sites.conf sudo koha-create --create-db memctest2 sudo grep -i memcache /etc/apache2/sites-available/memctest2 sudo grep -i memcache /etc/koha/sites/memctest2/koha-conf.xml sudo cp /etc/koha/koha-sites.conf_3 /etc/koha/koha-sites.conf sudo koha-create --create-db memctest3 sudo grep -i memcache /etc/apache2/sites-available/memctest3 sudo grep -i memcache /etc/koha/sites/memctest3/koha-conf.xml sudo cp /etc/koha/koha-sites.conf_4 /etc/koha/koha-sites.conf sudo koha-create --create-db memctest4 sudo grep -i memcache /etc/apache2/sites-available/memctest4 sudo grep -i memcache /etc/koha/sites/memctest4/koha-conf.xml sudo cp /etc/koha/koha-sites.conf_5 /etc/koha/koha-sites.conf sudo koha-create --create-db memctest5 sudo grep -i memcache /etc/apache2/sites-available/memctest5 sudo grep -i memcache /etc/koha/sites/memctest5/koha-conf.xml sudo cp /etc/koha/koha-sites.conf_6 /etc/koha/koha-sites.conf sudo koha-create --create-db memctest6 sudo grep -i memcache /etc/apache2/sites-available/memctest6 sudo grep -i memcache /etc/koha/sites/memctest6/koha-conf.xml sudo cp /etc/koha/koha-sites.conf_7 /etc/koha/koha-sites.conf sudo koha-create --create-db memctest7 sudo grep -i memcache /etc/apache2/sites-available/memctest7 sudo grep -i memcache /etc/koha/sites/memctest7/koha-conf.xml I hope to see the command-line test cases 2, 4, and 6 behave similarly to the koha-sites.conf versions. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 --- Comment #16 from M. Tompsett <mtompset@hotmail.com> --- sudo rm /etc/koha/koha-site.conf sudo koha-create --create-db memctest0 sudo grep -i memcache /etc/apache2/sites-available/memctest0 sudo grep -i memcache /etc/koha/sites/memctest0/koha-conf.xml RESULTS: Blank as expected sudo koha-create --create-db memctest1 --use-memcached sudo grep -i memcache /etc/apache2/sites-available/memctest1 sudo grep -i memcache /etc/koha/sites/memctest1/koha-conf.xml RESULTS: 127.0.0.1:11211 used for server, namespace is koha_memctest1 All as expected sudo koha-create --create-db memctest2 --memcached-servers "machinea:911" sudo grep -i memcache /etc/apache2/sites-available/memctest2 sudo grep -i memcache /etc/koha/sites/memctest2/koha-conf.xml RESULTS: Nothing generated. Error message given. All as expected. sudo koha-create --create-db memctest3 --use-memcached --memcached-servers "machinea:911" sudo grep -i memcache /etc/apache2/sites-available/memctest3 sudo grep -i memcache /etc/koha/sites/memctest3/koha-conf.xml RESULTS: machinea:911 used for server, namespace is koha_memctest3 All as expected. sudo koha-create --create-db memctest4 --memcached-prefix "test_" sudo grep -i memcache /etc/apache2/sites-available/memctest4 sudo grep -i memcache /etc/koha/sites/memctest4/koha-conf.xml RESULTS: Nothing generated. Error message given. All as expected. sudo koha-create --create-db memctest5 --use-memcached --memcached-prefix "test_" sudo grep -i memcache /etc/apache2/sites-available/memctest5 sudo grep -i memcache /etc/koha/sites/memctest5/koha-conf.xml RESULTS: 127.0.0.1:11211 used for server, namespace is test_memctest5 All as expected sudo koha-create --create-db memctest6 --memcached-servers "machinea:911" --memcached-prefix "test_" sudo grep -i memcache /etc/apache2/sites-available/memctest6 sudo grep -i memcache /etc/koha/sites/memctest6/koha-conf.xml RESULTS: Nothing generated. Error message given. All as expected. sudo koha-create --create-db memctest7 --use-memcached --memcached-servers "machinea:911" --memcached-prefix "test_" sudo grep -i memcache /etc/apache2/sites-available/memctest7 sudo grep -i memcache /etc/koha/sites/memctest7/koha-conf.xml RESULTS: machinea:911 used for server, namespace is test_memctest7 All as expected sudo koha-remove `koha-list` Here is what I put in my test koha-site.conf files: sudo vi /etc/koha/koha-sites.conf_7 DOMAIN=".mydnsname.org" OPACPORT="80" OPACSUFFIX="" OPACPREFIX="" INTRAPORT="80" INTRASUFFIX="-intra" INTRAPREFIX="" ZEBRA_MARC_FORMAT="marc21" ZEBRA_LANGUAGE="en" USE_MEMCACHED="yes" MEMCACHED_SERVERS="machinea:911" MEMCACHED_PREFIX="test_" sudo vi /etc/koha/koha-sites.conf_6 DOMAIN=".mydnsname.org" OPACPORT="80" OPACSUFFIX="" OPACPREFIX="" INTRAPORT="80" INTRASUFFIX="-intra" INTRAPREFIX="" ZEBRA_MARC_FORMAT="marc21" ZEBRA_LANGUAGE="en" USE_MEMCACHED="no" MEMCACHED_SERVERS="machinea:911" MEMCACHED_PREFIX="test_" sudo vi /etc/koha/koha-sites.conf_5 DOMAIN=".mydnsname.org" OPACPORT="80" OPACSUFFIX="" OPACPREFIX="" INTRAPORT="80" INTRASUFFIX="-intra" INTRAPREFIX="" ZEBRA_MARC_FORMAT="marc21" ZEBRA_LANGUAGE="en" USE_MEMCACHED="yes" MEMCACHED_SERVERS="" MEMCACHED_PREFIX="test_" sudo vi /etc/koha/koha-sites.conf_4 DOMAIN=".mydnsname.org" OPACPORT="80" OPACSUFFIX="" OPACPREFIX="" INTRAPORT="80" INTRASUFFIX="-intra" INTRAPREFIX="" ZEBRA_MARC_FORMAT="marc21" ZEBRA_LANGUAGE="en" USE_MEMCACHED="no" MEMCACHED_SERVERS="" MEMCACHED_PREFIX="test_" sudo vi /etc/koha/koha-sites.conf_3 DOMAIN=".mydnsname.org" OPACPORT="80" OPACSUFFIX="" OPACPREFIX="" INTRAPORT="80" INTRASUFFIX="-intra" INTRAPREFIX="" ZEBRA_MARC_FORMAT="marc21" ZEBRA_LANGUAGE="en" USE_MEMCACHED="yes" MEMCACHED_SERVERS="machinea:911" MEMCACHED_PREFIX="" sudo vi /etc/koha/koha-sites.conf_2 DOMAIN=".mydnsname.org" OPACPORT="80" OPACSUFFIX="" OPACPREFIX="" INTRAPORT="80" INTRASUFFIX="-intra" INTRAPREFIX="" ZEBRA_MARC_FORMAT="marc21" ZEBRA_LANGUAGE="en" USE_MEMCACHED="no" MEMCACHED_SERVERS="machinea:911" MEMCACHED_PREFIX="" sudo vi /etc/koha/koha-sites.conf_1 DOMAIN=".mydnsname.org" OPACPORT="80" OPACSUFFIX="" OPACPREFIX="" INTRAPORT="80" INTRASUFFIX="-intra" INTRAPREFIX="" ZEBRA_MARC_FORMAT="marc21" ZEBRA_LANGUAGE="en" USE_MEMCACHED="yes" MEMCACHED_SERVERS="" MEMCACHED_PREFIX="" sudo vi /etc/koha/koha-sites.conf_0 DOMAIN=".mydnsname.org" OPACPORT="80" OPACSUFFIX="" OPACPREFIX="" INTRAPORT="80" INTRASUFFIX="-intra" INTRAPREFIX="" ZEBRA_MARC_FORMAT="marc21" ZEBRA_LANGUAGE="en" USE_MEMCACHED="no" MEMCACHED_SERVERS="" MEMCACHED_PREFIX="" sudo cp /etc/koha/koha-sites.conf_0 /etc/koha/koha-sites.conf sudo koha-create --create-db memctest0 sudo grep -i memcache /etc/apache2/sites-available/memctest0 sudo grep -i memcache /etc/koha/sites/memctest0/koha-conf.xml RESULTS: Blank as expected sudo cp /etc/koha/koha-sites.conf_1 /etc/koha/koha-sites.conf sudo koha-create --create-db memctest1 sudo grep -i memcache /etc/apache2/sites-available/memctest1 sudo grep -i memcache /etc/koha/sites/memctest1/koha-conf.xml RESULTS: 127.0.0.1:11211 used for server, namespace is koha_memctest1 All as expected sudo cp /etc/koha/koha-sites.conf_2 /etc/koha/koha-sites.conf sudo koha-create --create-db memctest2 sudo grep -i memcache /etc/apache2/sites-available/memctest2 sudo grep -i memcache /etc/koha/sites/memctest2/koha-conf.xml RESULTS: Blank. Perhaps some sort of warning is in order? sudo cp /etc/koha/koha-sites.conf_3 /etc/koha/koha-sites.conf sudo koha-create --create-db memctest3 sudo grep -i memcache /etc/apache2/sites-available/memctest3 sudo grep -i memcache /etc/koha/sites/memctest3/koha-conf.xml RESULTS: machinea:911 used for server, namespace is koha_memctest3 All as expected. sudo cp /etc/koha/koha-sites.conf_4 /etc/koha/koha-sites.conf sudo koha-create --create-db memctest4 sudo grep -i memcache /etc/apache2/sites-available/memctest4 sudo grep -i memcache /etc/koha/sites/memctest4/koha-conf.xml RESULTS: Blank. Perhaps some sort of warning is in order? sudo cp /etc/koha/koha-sites.conf_5 /etc/koha/koha-sites.conf sudo koha-create --create-db memctest5 sudo grep -i memcache /etc/apache2/sites-available/memctest5 sudo grep -i memcache /etc/koha/sites/memctest5/koha-conf.xml RESULTS: 127.0.0.1:11211 used for server, namespace is test_memctest5 All as expected sudo cp /etc/koha/koha-sites.conf_6 /etc/koha/koha-sites.conf sudo koha-create --create-db memctest6 sudo grep -i memcache /etc/apache2/sites-available/memctest6 sudo grep -i memcache /etc/koha/sites/memctest6/koha-conf.xml RESULTS: Blank. Perhaps some sort of warning is in order? sudo cp /etc/koha/koha-sites.conf_7 /etc/koha/koha-sites.conf sudo koha-create --create-db memctest7 sudo grep -i memcache /etc/apache2/sites-available/memctest7 sudo grep -i memcache /etc/koha/sites/memctest7/koha-conf.xml RESULTS: machinea:911 used for server, namespace is test_memctest7 All as expected. sudo cp /etc/koha/koha-sites.conf_7 /etc/koha/koha-sites.conf sudo koha-create --create-db memctest8 --memcached-servers "skynet:2025" --memcached-prefix "override1_" sudo grep -i memcache /etc/apache2/sites-available/memctest8 sudo grep -i memcache /etc/koha/sites/memctest8/koha-conf.xml RESULTS: skynet:2025 used for server, namespace is override1_memctest8 All as expected. sudo cp /etc/koha/koha-sites.conf_6 /etc/koha/koha-sites.conf sudo koha-create --create-db memctest9 --use-memcached sudo grep -i memcache /etc/apache2/sites-available/memctest9 sudo grep -i memcache /etc/koha/sites/memctest9/koha-conf.xml RESULTS: machinea:911 used for server, namespace is test_memctest9 All as expected. Cool mixture to get it to work. sudo cp /etc/koha/koha-sites.conf_2 /etc/koha/koha-sites.conf sudo koha-create --create-db memctest10 --memcached-servers "skynet:2025" --memcached-prefix "override_" sudo grep -i memcache /etc/apache2/sites-available/memctest10 sudo grep -i memcache /etc/koha/sites/memctest10/koha-conf.xml RESULTS: Nothing generated. Error message given. All as expected. man koha-create RESULTS: All as expected. koha-create --help RESULTS: All as expected. As far as I can tell everything is okay. Though, the blank without warning (koha-sites.conf) vs. error (command-line) discrepancy bothers me. The latter makes sense to me. The former is asking for confusion as to why something isn't working. However, I'll leave that issue as a QA issue to discuss. Now to figure out how to sign these off. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #20358|0 |1 is obsolete| | Attachment #21055|0 |1 is obsolete| | Attachment #21085|0 |1 is obsolete| | --- Comment #17 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 21103 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21103&action=edit [SIGNED OFF] Bug 10733: add 'memcached' as suggested dependency Adds 'memcached' to the control.in file so the user is suggested by apt to install it. Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 --- Comment #18 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 21104 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21104&action=edit [SIGNED OFF] Bug 10733: Memcached on package installs This patch makes the koha-create script adjust the koha-conf.xml file with the proper string substitutions to enable the use of memcached for the created Koha instance. It adds three option switches that control this: --use-memcached (defaults to "no") --memcached-servers "host1:port1,..." (defaults to '127.0.0.1:11211') --memcached-prefix "desired_namespace prefix" (defaults to 'koha_') It respects the current schema configuration schema, where configuration values are pondered like this: hardcoded < koha-sites.conf < koha-create option switches koha-sites.conf is read for USE_MEMCACHED, MEMCACHED_SERVERS and MEMCACHED_PREFIX. Note: the docs discourage setting user's own namespace prefix. Using memcached is off as the default. The relevant configuration variables will remain empty if the user doesn't pass --use-memcached to the command. It matches the current behaviour. To test: - Apply the patch - Build your own packages and install them on a test server a) Create a new instance without using the new switches like: $ koha-create --create-db memctest - Check that /etc/koha/sites/memctest/koha-conf.xml contains: * Empty <memcached_servers> tag. * Empty <memcached_namespace> tag. b) Play with the possible combination of option switches (Note that the code defaults to empty and will remain like that if --use-memcached is not used, so less tests...) $ koha-create --create-db --use-memcached memctest $ koha-create --create-db --use-memcached --memcached-servers "anything:xxx" memctest $ koha-create --create-db --use-memcached --memcached-servers "anything:xxx" --memcached-prefix "something" memctest $ koha-create --create-db --use-memcached --memcached-prefix "something" memctest - Check the koha-conf.xml and /etc/apache2/sites-enabled/memctest file reflect the chosen options. c) Run $ koha-create --help - It should advertise this addition accordingly. d) Run $ man koha-create - Man page for koha-create should provide good information on the new switches behaviour Enjoy To+ Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 --- Comment #19 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 21105 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21105&action=edit [SIGNED OFF] Bug 10733: Follow up - unset variables from koha-sites.conf if USE_MEMCACHED=no As configuration variables from koha-sites.conf overwrite the ones in the koha-create script we need to unset them in case we have USE_MEMCACHED="no". Regards To+ Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #20 from M. Tompsett <mtompset@hotmail.com> --- Hopefully I did the sign off correctly. This is my first time ever. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 --- Comment #21 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 21617 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21617&action=edit Bug 10733: add 'memcached' as suggested dependency Adds 'memcached' to the control.in file so the user is suggested by apt to install it. Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Robin Sheat <robin@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 --- Comment #22 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 21618 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21618&action=edit Bug 10733: Memcached on package installs This patch makes the koha-create script adjust the koha-conf.xml file with the proper string substitutions to enable the use of memcached for the created Koha instance. It adds three option switches that control this: --use-memcached (defaults to "no") --memcached-servers "host1:port1,..." (defaults to '127.0.0.1:11211') --memcached-prefix "desired_namespace prefix" (defaults to 'koha_') It respects the current schema configuration schema, where configuration values are pondered like this: hardcoded < koha-sites.conf < koha-create option switches koha-sites.conf is read for USE_MEMCACHED, MEMCACHED_SERVERS and MEMCACHED_PREFIX. Note: the docs discourage setting user's own namespace prefix. Using memcached is off as the default. The relevant configuration variables will remain empty if the user doesn't pass --use-memcached to the command. It matches the current behaviour. To test: - Apply the patch - Build your own packages and install them on a test server a) Create a new instance without using the new switches like: $ koha-create --create-db memctest - Check that /etc/koha/sites/memctest/koha-conf.xml contains: * Empty <memcached_servers> tag. * Empty <memcached_namespace> tag. b) Play with the possible combination of option switches (Note that the code defaults to empty and will remain like that if --use-memcached is not used, so less tests...) $ koha-create --create-db --use-memcached memctest $ koha-create --create-db --use-memcached --memcached-servers "anything:xxx" memctest $ koha-create --create-db --use-memcached --memcached-servers "anything:xxx" --memcached-prefix "something" memctest $ koha-create --create-db --use-memcached --memcached-prefix "something" memctest - Check the koha-conf.xml and /etc/apache2/sites-enabled/memctest file reflect the chosen options. c) Run $ koha-create --help - It should advertise this addition accordingly. d) Run $ man koha-create - Man page for koha-create should provide good information on the new switches behaviour Enjoy To+ Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Robin Sheat <robin@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 --- Comment #23 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 21619 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21619&action=edit Bug 10733: Follow up - unset variables from koha-sites.conf if USE_MEMCACHED=no As configuration variables from koha-sites.conf overwrite the ones in the koha-create script we need to unset them in case we have USE_MEMCACHED="no". Regards To+ Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Robin Sheat <robin@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #21103|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #21105|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #21104|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #24 from Robin Sheat <robin@catalyst.net.nz> --- These look fine to me. One suggestion might be having a default prefix relating to the instance name, as this will reduce the chance of a collision a lot. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_3_14_candidate -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #25 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Tomás! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |11167 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10733 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@enger.priv.no --- Comment #26 from Magnus Enger <magnus@enger.priv.no> --- Attachment 21618 adds MEMCACHED placeholders both to debian/templates/apache-site.conf.in and debian/templates/koha-conf-site.xml.in. The former is correct, the latter is obsolete. I propose to remove the unnecessary memcached config lines from debian/templates/koha-conf-site.xml.in on bug 11167. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org