Bugzilla – Attachment 55266 Details for
Bug 17262
Plack on packages is not having memcached set properly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17262: Inject MEMCACHED_* variables into Plack's env
Bug-17262-Inject-MEMCACHED-variables-into-Placks-e.patch (text/plain), 2.21 KB, created by
Tomás Cohen Arazi (tcohen)
on 2016-09-06 19:51:27 UTC
(
hide
)
Description:
Bug 17262: Inject MEMCACHED_* variables into Plack's env
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2016-09-06 19:51:27 UTC
Size:
2.21 KB
patch
obsolete
>From c40dcdfa871155c63f47809ffcbc14ed61acf1b3 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 6 Sep 2016 16:45:36 -0300 >Subject: [PATCH] Bug 17262: Inject MEMCACHED_* variables into Plack's env > >This patch adds two functions to koha-functions.sh to read the MEMCACHED_* >variables from configured instances' apache files (the only source for that >info for now). > >It then tweaks koha-plack's start_plack() function so it exports the variables >to env before launching starman. > >The patch seems trivial, but it highlights a bigger problem with our Plack integration >as the starman server seems to hang if those environment variables are defined! > >Sponsored-by: ByWater Solutions >--- > debian/scripts/koha-functions.sh | 26 ++++++++++++++++++++++++++ > debian/scripts/koha-plack | 2 ++ > 2 files changed, 28 insertions(+) > >diff --git a/debian/scripts/koha-functions.sh b/debian/scripts/koha-functions.sh >index cf6835d..b6f1203 100755 >--- a/debian/scripts/koha-functions.sh >+++ b/debian/scripts/koha-functions.sh >@@ -43,6 +43,32 @@ get_apache_config_for() > fi > } > >+get_memcached_servers_for() >+{ >+ local instance=$1 >+ >+ local apache_file=$(get_apache_config_for $instance) >+ local memcached_servers=$( >+ grep 'MEMCACHED_SERVERS' ${apache_file} | >+ awk '{print $3}' | uniq >+ ) >+ >+ echo "${memcached_servers}" >+} >+ >+get_memcached_namespace_for() >+{ >+ local instance=$1 >+ >+ local apache_file=$(get_apache_config_for $instance) >+ local memcached_namespace=$( >+ grep 'MEMCACHED_NAMESPACE' ${apache_file} | >+ awk '{print $3}' | uniq >+ ) >+ >+ echo "${memcached_namespace}" >+} >+ > get_opacdomain_for() > { > local site=$1 >diff --git a/debian/scripts/koha-plack b/debian/scripts/koha-plack >index ed0f421..229f059 100755 >--- a/debian/scripts/koha-plack >+++ b/debian/scripts/koha-plack >@@ -84,6 +84,8 @@ start_plack() > > if ! is_plack_running ${instancename}; then > export KOHA_CONF="/etc/koha/sites/${instancename}/koha-conf.xml" >+ export MEMCACHED_SERVERS=$(get_memcached_servers_for $instancename) >+ export MEMCACHED_NAMESPACE=$(get_memcached_namespace_for $instancename) > > log_daemon_msg "Starting Plack daemon for ${instancename}" > >-- >2.10.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17262
:
55266
|
55742