Updated packages of varnish-2.1.4 revisited
Ingvar Hagelund
ingvar at redpill-linpro.com
Tue Nov 9 16:19:22 CET 2010
For those that do not follow my blog:
An extra update of the varnish-2.1.4 packages was pushed to Fedora
(rawhide, f14, f13, epel6), including a bugfix (bug #801)
I also finally got around and fixed
make-initscript-reload-do-load-and-switch-vcl, by popular request. I had
a look at the script in Debian, but found it too magical. My version
uses explicit configuration in /etc/sysconfig/varnish.
Updated packages for RHEL4 and 5 available at the usual place, that is
http://users.linpro.no/ingvar/varnish/
Most of this will end up upstream rsn, srsly.
A few additional comments on the sysconfig/reload stuff:
Since varnishd did not reload vcl via traditional SIGHUP or other
old-school unix daemon signals, when this package was first built, a
'service varnish reload' became a force-reload, that is, ending up
restarting the daemon (and dropping the cache).
This update includes a script that loads vcl from a preconfigured file,
and switches to that configuration. If configured to do so, 'service
varnish reload' will now call this script instead of restarting.
For new RPM installations, and installations where
/etc/sysconfig/varnish has not been touched, this is default behavior.
Other users may switch this on by setting the following variables in
/etc/sysconfig/varnish:
RELOAD_VCL
VARNISH_VCL_CONF
VARNISH_ADMIN_LISTEN_PORT
RELOAD_VCL must be set to 1. Other variables parsed by the script are
VARNISH_SECRET_FILE
VARNISH_ADMIN_LISTEN_ADDRESS
An example:
excerpt from /etc/sysconfig/varnish:
#...
RELOAD_VCL=1
VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1
VARNISH_ADMIN_LISTEN_PORT=6082
VARNISH_VCL_CONF=/etc/varnish/default.vcl
VARNISH_SECRET_FILE=/etc/varnish/secret
#...
shell dump:
# service varnish reload
Loading vcl from /etc/varnish/default.vcl
Current running config name is boot
Using new config name reload_2010-11-09T16:17:37
VCL compiled.
available 1 boot
active 0 reload_2010-11-09T16:17:37
Done
That's it.
Ingvar
More information about the varnish-dist
mailing list