]> err.no Git - varnish/log
varnish
16 years agoAlso dump workspaces in panic.
phk [Sun, 20 Jul 2008 12:03:14 +0000 (12:03 +0000)]
Also dump workspaces in panic.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2979 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoIgnore a couple of return values
phk [Sun, 20 Jul 2008 11:44:29 +0000 (11:44 +0000)]
Ignore a couple of return values

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2978 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd diag_bitmap controls for panic behaviour.
phk [Sun, 20 Jul 2008 11:40:30 +0000 (11:40 +0000)]
Add diag_bitmap controls for panic behaviour.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2977 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoRemove the session-specific assert facility, the general assert facility
phk [Sun, 20 Jul 2008 11:28:40 +0000 (11:28 +0000)]
Remove the session-specific assert facility, the general assert facility
dumps details now.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2976 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoReconstitute the dumping of sessions, objects &c &c, but now do it for
phk [Sun, 20 Jul 2008 11:28:10 +0000 (11:28 +0000)]
Reconstitute the dumping of sessions, objects &c &c, but now do it for
all asserts from a thread with a registered session.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2975 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agopanicstr is deliberately not static
phk [Sun, 20 Jul 2008 11:24:57 +0000 (11:24 +0000)]
panicstr is deliberately not static

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2974 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoRemove debug hack which sneaked in.
phk [Sun, 20 Jul 2008 10:46:00 +0000 (10:46 +0000)]
Remove debug hack which sneaked in.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2973 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoReport thread name and thread session in panic messages.
phk [Sun, 20 Jul 2008 10:45:09 +0000 (10:45 +0000)]
Report thread name and thread session in panic messages.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2972 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoMake room in the shared memory segment for a panic string
phk [Sun, 20 Jul 2008 10:36:28 +0000 (10:36 +0000)]
Make room in the shared memory segment for a panic string
buffer.

Replace the default libvarnish assert handler with a child specific
function.

This function which fills the static panic string and copy the
result to the shared memory panicstring.

In the manager process, report the content of the panic string
when the child dies.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2971 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoMake the backend function of libvarnish' assert facilities pluggable.
phk [Sun, 20 Jul 2008 10:03:42 +0000 (10:03 +0000)]
Make the backend function of libvarnish' assert facilities pluggable.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2970 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoStore the current session in thread private data.
phk [Sun, 20 Jul 2008 09:57:25 +0000 (09:57 +0000)]
Store the current session in thread private data.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2969 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoMore assorted FlexeLint polishing
phk [Sat, 19 Jul 2008 12:38:28 +0000 (12:38 +0000)]
More assorted FlexeLint polishing

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2968 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoTechnically speaking, vsb_len() could return -1, except it won't because
phk [Sat, 19 Jul 2008 12:04:25 +0000 (12:04 +0000)]
Technically speaking, vsb_len() could return -1, except it won't because
of the vsb_overflow() assert.

Make this explicit for FlexeLint.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2967 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoExplain to FlexeLint that _storage is not referenced.
phk [Sat, 19 Jul 2008 12:03:16 +0000 (12:03 +0000)]
Explain to FlexeLint that _storage is not referenced.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2966 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoConstify WS_Free()
phk [Sat, 19 Jul 2008 11:50:09 +0000 (11:50 +0000)]
Constify WS_Free()

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2965 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoExplicitly specify index in name array.
phk [Sat, 19 Jul 2008 11:49:43 +0000 (11:49 +0000)]
Explicitly specify index in name array.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2964 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoDeal appropriately with ParseArgv returning NULL
phk [Sat, 19 Jul 2008 11:44:41 +0000 (11:44 +0000)]
Deal appropriately with ParseArgv returning NULL

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2963 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoExplicitly silence three FlexeLint complaints
phk [Sat, 19 Jul 2008 11:43:51 +0000 (11:43 +0000)]
Explicitly silence three FlexeLint complaints

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2962 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoFlexeLint inspired polishing:
phk [Sat, 19 Jul 2008 11:38:31 +0000 (11:38 +0000)]
FlexeLint inspired polishing:

Better choice of data types.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2961 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoFlexeLint inspired polishing:
phk [Sat, 19 Jul 2008 11:33:24 +0000 (11:33 +0000)]
FlexeLint inspired polishing:

Detect empty args.
Handle 'b' suffix in switch.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2960 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd a protocol version number ("1.0") to the ping response.
phk [Sat, 19 Jul 2008 10:40:13 +0000 (10:40 +0000)]
Add a protocol version number ("1.0") to the ping response.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2959 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoUnused struct member.
phk [Sat, 19 Jul 2008 09:51:41 +0000 (09:51 +0000)]
Unused struct member.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2958 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoRemove pointless volatile
phk [Sat, 19 Jul 2008 09:50:42 +0000 (09:50 +0000)]
Remove pointless volatile

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2957 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoDon't constify the cli argument to cli_out()
phk [Sat, 19 Jul 2008 09:44:40 +0000 (09:44 +0000)]
Don't constify the cli argument to cli_out()

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2956 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoWash & cleaning of the -h and -s argument handling.
phk [Sat, 19 Jul 2008 09:24:07 +0000 (09:24 +0000)]
Wash & cleaning of the -h and -s argument handling.

No functional changes.

Add ARGV_ERR() macro for reporting argument trouble.

Do selection of method in varnishd.c, using generic choice function.

Split subarguments into argc+argv at commans, and pass those down to
avoid repetitive and bogus string munging.

Catch more error conditions with respect to subarguments.

Add mini_obj magics to stevedores and slingers.

Generally tidy up along the way.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2955 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAugment ParseArgv() to also split comma separated lists.
phk [Sat, 19 Jul 2008 07:19:12 +0000 (07:19 +0000)]
Augment ParseArgv() to also split comma separated lists.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2954 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAvoid home-rolled circular list in stevedore, use regular VTAILQ,
phk [Sat, 19 Jul 2008 06:46:42 +0000 (06:46 +0000)]
Avoid home-rolled circular list in stevedore, use regular VTAILQ,
the microoptimization does not justify the manual handling of ->prev
and ->next.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2953 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agotypo.
phk [Sat, 19 Jul 2008 06:43:34 +0000 (06:43 +0000)]
typo.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2952 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoPolish the tokenizer
phk [Fri, 18 Jul 2008 21:30:01 +0000 (21:30 +0000)]
Polish the tokenizer

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2951 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoThere was no need to send the err_ttl as parameter as SYN_ErrorPage had access to...
petter [Fri, 18 Jul 2008 07:16:45 +0000 (07:16 +0000)]
There was no need to send the err_ttl as parameter as SYN_ErrorPage had access to the it directly.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2950 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdded the parameter err_ttl, which sets the TTL for synthesized error pages. Default...
petter [Fri, 18 Jul 2008 07:01:42 +0000 (07:01 +0000)]
Added the parameter err_ttl, which sets the TTL for synthesized error pages. Default value is 0. Fixes #126.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2949 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdded support for choosing what fields to show in varniststat. This is done by using...
petter [Thu, 17 Jul 2008 09:58:54 +0000 (09:58 +0000)]
Added support for choosing what fields to show in varniststat. This is done by using the new -f option. To list avaialble fields, use the new -l option. Fixes #208.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2946 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoOoops, FlexeLint was wrong, the consts are not possible.
phk [Mon, 14 Jul 2008 15:53:22 +0000 (15:53 +0000)]
Ooops, FlexeLint was wrong, the consts are not possible.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2945 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoThree minor style nits from FlexeLint
phk [Mon, 14 Jul 2008 15:49:41 +0000 (15:49 +0000)]
Three minor style nits from FlexeLint

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2944 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdded a round robin director. The round robin director can be created like this:
petter [Mon, 14 Jul 2008 12:59:10 +0000 (12:59 +0000)]
Added a round robin director. The round robin director can be created like this:

director batman round-robin {
{ .backend = b1; }
{ .backend = b2; }
{ .backend = b3; }
}

sub vcl_recv {
set req.backend = batman;
}

The backend will then be chosen in a round robin fashion.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2943 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd a bit of variation to the Connection header
phk [Fri, 11 Jul 2008 22:13:29 +0000 (22:13 +0000)]
Add a bit of variation to the Connection header

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2942 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoTest that "Connection:" header deletes http headers in both directions.
phk [Fri, 11 Jul 2008 22:07:10 +0000 (22:07 +0000)]
Test that "Connection:" header deletes http headers in both directions.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2941 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoRetire mgt_event.[ch] and use instead the (new) copy of it in libvarnish.
phk [Fri, 11 Jul 2008 21:34:17 +0000 (21:34 +0000)]
Retire mgt_event.[ch] and use instead the (new) copy of it in libvarnish.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2940 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoCopy mgt_event.[ch] from varnishd into libvarnish and give it the
phk [Fri, 11 Jul 2008 21:33:26 +0000 (21:33 +0000)]
Copy mgt_event.[ch] from varnishd into libvarnish and give it the
prefix "VEV".

This is a general purpose eventmanager and as such should live in
the library where other programs can get at it.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2939 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd a backend property ".host_header" to set default content of Host:
phk [Fri, 11 Jul 2008 21:02:05 +0000 (21:02 +0000)]
Add a backend property ".host_header" to set default content of Host:
header if client didn't provide one.

If .host_header is not specified, it defaults to .host.

Add testcase for this logic.

(Incidental change: Use "interval" instead of "rate" for backend pollers.)

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2938 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd scaffold code for backend polling.
phk [Fri, 11 Jul 2008 20:41:39 +0000 (20:41 +0000)]
Add scaffold code for backend polling.

It doesn't actually do anything yet.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2937 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoDrop pseudo-automatic support for multihomed backends and require
phk [Fri, 11 Jul 2008 19:49:20 +0000 (19:49 +0000)]
Drop pseudo-automatic support for multihomed backends and require
clear expression of intent in VCL.

We now fail backend hostnames that resolve to multiple IPv4 or multiple
IPv6 addresses, in other words, you cannot use "cnn.com" as a backend
hostname specification without the compiler yelling at you:

    % ./varnishd -d -d -b cnn.com -a :8080
    Backend host "cnn.com": resolves to multiple IPv4 addresses.
    Only one address is allowed.
    Please specify which exact address you want to use, we found these:
    64.236.16.20
    64.236.16.52
    64.236.24.12
    64.236.29.120
    [...]
    VCL compilation failed

However, you _can_ use a hostname that resolves to both an IPv4 and
an IPv6 address, and the new paramter "prefer_ipv6" will determine
which one we try first in such cases.

The other part of this change is that we now do the DNS lookup at
VCL compiletime, and only then.

If your backend's DNS record (or /etc/hosts entry) changes IP#, you
must reload your VCL code to notify varnish.

Finer technical points:

We build a bytestring representation of the sockaddr's in VCC and
include them in the concept of backend identity, for an existing
backend (+ connections) to be reused for a new VCL the backend must
now be defined exactly the same way AND have the same resolved
IPv4/IPv6 addresses.

Since we never muck about with the address in the backend struct
anymore, it's static for the life of the struct backend instance,
we can simplify and eliminate the locking dance around our connection
attempts.

Also eliminate the struct vrt_backend inclusion in struct backend,
and instead make the relevat fields full-blown members of struct
backend.  This eliminates a number of TRUST_ME() calls.

This is the companion commit to #2934 which prepared the VCL compiler.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2936 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoEmit backend probe data to ->fb.
phk [Fri, 11 Jul 2008 18:57:13 +0000 (18:57 +0000)]
Emit backend probe data to ->fb.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2935 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoReject backend hostnames that resolve to multiple IPv4 or multiple
phk [Fri, 11 Jul 2008 10:12:52 +0000 (10:12 +0000)]
Reject backend hostnames that resolve to multiple IPv4 or multiple
IPv6 addresses, but accept one of each.

Emit a bytestring representation of the sockaddr we found for each
of these, into the shared object, so we avoid doing a DNS lookup
again in the cacher.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2934 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoMake the vcl.list use the same layout in stopped mode as in started mode.
phk [Thu, 10 Jul 2008 21:55:48 +0000 (21:55 +0000)]
Make the vcl.list use the same layout in stopped mode as in started mode.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2933 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoCheck counters to make sure the right thing happens.
phk [Thu, 10 Jul 2008 21:51:19 +0000 (21:51 +0000)]
Check counters to make sure the right thing happens.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2932 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoOne more.
phk [Thu, 10 Jul 2008 21:43:44 +0000 (21:43 +0000)]
One more.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2931 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd more trouble
phk [Thu, 10 Jul 2008 21:34:44 +0000 (21:34 +0000)]
Add more trouble

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2930 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoMore XML/ESI testcases
phk [Thu, 10 Jul 2008 21:24:07 +0000 (21:24 +0000)]
More XML/ESI testcases

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2929 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoYet another XML/ESI parse corner case:
phk [Thu, 10 Jul 2008 21:23:52 +0000 (21:23 +0000)]
Yet another XML/ESI parse corner case:
<esi:include  foo=bar src=/body2 />

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2928 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoMore XML/ESI syntax checks
phk [Thu, 10 Jul 2008 21:11:30 +0000 (21:11 +0000)]
More XML/ESI syntax checks

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2927 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoTackle another XML/ESI syntax error corner-case:
phk [Thu, 10 Jul 2008 21:11:11 +0000 (21:11 +0000)]
Tackle another XML/ESI syntax error corner-case:
<esi:include  src= />
would result in a NUL byte when looking for the next attribute.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2926 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoTrigger a couple more XML/ESI parser errors
phk [Thu, 10 Jul 2008 20:50:04 +0000 (20:50 +0000)]
Trigger a couple more XML/ESI parser errors

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2925 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoFix two bugs in esi parsing:
phk [Thu, 10 Jul 2008 20:49:45 +0000 (20:49 +0000)]
Fix two bugs in esi parsing:

Ignore unknown include attributes and
Warn about src attributes without value

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2924 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoMore XML/ESI errors
phk [Thu, 10 Jul 2008 20:25:40 +0000 (20:25 +0000)]
More XML/ESI errors

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2923 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoTest XML/ESI syntax errors etc.
phk [Thu, 10 Jul 2008 20:08:57 +0000 (20:08 +0000)]
Test XML/ESI syntax errors etc.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2922 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoTest the vcl.load CLI command while we are at it.
phk [Thu, 10 Jul 2008 19:59:56 +0000 (19:59 +0000)]
Test the vcl.load CLI command while we are at it.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2921 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd a test for the -f argument
phk [Thu, 10 Jul 2008 19:40:17 +0000 (19:40 +0000)]
Add a test for the -f argument

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2920 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoFix an off-by one in the random director
phk [Thu, 10 Jul 2008 18:09:42 +0000 (18:09 +0000)]
Fix an off-by one in the random director

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2919 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd a testcase for the random director doing actual work
phk [Thu, 10 Jul 2008 18:08:42 +0000 (18:08 +0000)]
Add a testcase for the random director doing actual work

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2918 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd a testcase to show that we can in fact get rid of both VCL's and
phk [Thu, 10 Jul 2008 11:17:22 +0000 (11:17 +0000)]
Add a testcase to show that we can in fact get rid of both VCL's and
backend hosts.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2917 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd a testcase for the sema operations
phk [Thu, 10 Jul 2008 10:27:43 +0000 (10:27 +0000)]
Add a testcase for the sema operations

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2916 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd Semaphore facility to synchronize different treads in the tester
phk [Thu, 10 Jul 2008 10:26:17 +0000 (10:26 +0000)]
Add Semaphore facility to synchronize different treads in the tester
with each other.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2915 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoThe emminently sensible INFTIM isn't portable, use -1
phk [Thu, 10 Jul 2008 09:34:47 +0000 (09:34 +0000)]
The emminently sensible INFTIM isn't portable, use -1

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2914 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd stats counters for tracking the number of vcls loaded.
phk [Thu, 10 Jul 2008 08:09:15 +0000 (08:09 +0000)]
Add stats counters for tracking the number of vcls loaded.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2913 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoMake it possible to check stats counter values for a varnish instance
phk [Thu, 10 Jul 2008 08:00:33 +0000 (08:00 +0000)]
Make it possible to check stats counter values for a varnish instance

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2912 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoOpen the shm statistics when we launch a varnish
phk [Thu, 10 Jul 2008 07:32:07 +0000 (07:32 +0000)]
Open the shm statistics when we launch a varnish

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2911 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoRemove global "stats", stats are per varnish instance.
phk [Thu, 10 Jul 2008 07:27:56 +0000 (07:27 +0000)]
Remove global "stats", stats are per varnish instance.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2910 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoChange the layout of the "vcl.list" to explicitly say "active",
phk [Wed, 9 Jul 2008 09:06:57 +0000 (09:06 +0000)]
Change the layout of the "vcl.list" to explicitly say "active",
"available" or "discarded".

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2909 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoThe cachers CLI thread is responsible for garbage collecting dicarded
phk [Wed, 9 Jul 2008 08:56:46 +0000 (08:56 +0000)]
The cachers CLI thread is responsible for garbage collecting dicarded
VCL programs, but in practice it didn't happen because we fired the
GC function VCL_Idle() after 5 seconds of silence on the CLI port and
the manager pings every three (by default).

Instead change the name of VCL_Idle() to VCL_Poll() and call it
before every CLI command, so that any query command will get an
up to date status.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2908 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAllow modification of the receive timeout
phk [Wed, 9 Jul 2008 08:14:25 +0000 (08:14 +0000)]
Allow modification of the receive timeout

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2907 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoSet svn:keywords to Id
phk [Tue, 8 Jul 2008 10:29:07 +0000 (10:29 +0000)]
Set svn:keywords to Id

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2906 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoSplit the backend code into two files, the probe code will make it
phk [Tue, 8 Jul 2008 10:09:03 +0000 (10:09 +0000)]
Split the backend code into two files, the probe code will make it
more complicated than a single file can carry.

cache_backend_cfg.c now contains the configuration and selection of
backends and directors.

cache_backend.c contains the connection and request management against
backends.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2905 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoNote an idea
phk [Tue, 8 Jul 2008 09:48:05 +0000 (09:48 +0000)]
Note an idea

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2904 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAlso make the backend probe rate (how often we probe) configurable
phk [Tue, 8 Jul 2008 09:17:42 +0000 (09:17 +0000)]
Also make the backend probe rate (how often we probe) configurable
in VCL.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2903 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd VCC support for backend probe specifications.
phk [Tue, 8 Jul 2008 09:15:32 +0000 (09:15 +0000)]
Add VCC support for backend probe specifications.

It is possible to specify just the URL to be probed, or to specify the
entire HTTP request:

backend b0 {
.host = "127.0.0.1";
.probe = {
.url = "/test.jpg";
.timeout = 224 ms;
}
}

backend b1 {
.host = "127.0.0.1";
.probe = {
# NB: \r\n automatically inserted after each string!
.request =
    "GET / HTTP/1.1"
    "Host: www.foo.bar"
    "Connection: close";
.timeout = 0.3 s;
}
}

If the full request has not been completed within the timeout, the
backend will be set to down.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2902 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoassert !vsb_overflowed()
phk [Tue, 8 Jul 2008 08:53:37 +0000 (08:53 +0000)]
assert !vsb_overflowed()

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2901 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoUnify parsing of backends and directors.
phk [Tue, 8 Jul 2008 07:30:42 +0000 (07:30 +0000)]
Unify parsing of backends and directors.

Use table to dispatch director parsing.

Get trailing '}' into backend host ident string.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2900 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd test for unknown director policy
phk [Tue, 8 Jul 2008 07:10:41 +0000 (07:10 +0000)]
Add test for unknown director policy

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2899 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoFlexelint nits
phk [Tue, 8 Jul 2008 06:30:16 +0000 (06:30 +0000)]
Flexelint nits

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2898 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoDon't create an unnecessary fencepost member.
phk [Mon, 7 Jul 2008 22:19:05 +0000 (22:19 +0000)]
Don't create an unnecessary fencepost member.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2897 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd testcase for creation and destruction of backends
phk [Mon, 7 Jul 2008 22:15:12 +0000 (22:15 +0000)]
Add testcase for creation and destruction of backends

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2896 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoDismantle directors and backends properly.
phk [Mon, 7 Jul 2008 22:11:39 +0000 (22:11 +0000)]
Dismantle directors and backends properly.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2895 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoMore polishing of backend parsing/syntax error messages
phk [Mon, 7 Jul 2008 21:49:21 +0000 (21:49 +0000)]
More polishing of backend parsing/syntax error messages

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2894 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoNitpicking
phk [Mon, 7 Jul 2008 21:22:20 +0000 (21:22 +0000)]
Nitpicking

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2893 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoFix an encoding bug that affects VCLs shorter than 1 char.
phk [Mon, 7 Jul 2008 21:22:06 +0000 (21:22 +0000)]
Fix an encoding bug that affects VCLs shorter than 1 char.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2892 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agotestcase for unknown backend field
phk [Mon, 7 Jul 2008 21:09:05 +0000 (21:09 +0000)]
testcase for unknown backend field

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2891 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoTestcase for old backend syntax.
phk [Mon, 7 Jul 2008 21:06:55 +0000 (21:06 +0000)]
Testcase for old backend syntax.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2890 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoMore polishing of backend compilation.
phk [Mon, 7 Jul 2008 21:01:25 +0000 (21:01 +0000)]
More polishing of backend compilation.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2889 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoMove backend stuff to the correct .h file
phk [Mon, 7 Jul 2008 20:26:58 +0000 (20:26 +0000)]
Move backend stuff to the correct .h file

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2888 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoDon't allow the invisible simple director to reference backend defined
phk [Mon, 7 Jul 2008 18:26:15 +0000 (18:26 +0000)]
Don't allow the invisible simple director to reference backend defined
by another simple director, it would be too hard to explain why they
shared statistics and harder yet to make them not do so.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2887 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoRedo toplevel parser to use table.
phk [Mon, 7 Jul 2008 18:21:06 +0000 (18:21 +0000)]
Redo toplevel parser to use table.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2886 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoMove random director to separate source file.
phk [Mon, 7 Jul 2008 18:02:06 +0000 (18:02 +0000)]
Move random director to separate source file.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2885 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd a test-case for backend reference errors.
phk [Mon, 7 Jul 2008 17:42:42 +0000 (17:42 +0000)]
Add a test-case for backend reference errors.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2884 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoImprove error messages in backend specifications
phk [Mon, 7 Jul 2008 17:42:27 +0000 (17:42 +0000)]
Improve error messages in backend specifications

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2883 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoJust to avoid misunderstandings: say that we expected the VCL compilation errors.
phk [Mon, 7 Jul 2008 17:21:57 +0000 (17:21 +0000)]
Just to avoid misunderstandings: say that we expected the VCL compilation errors.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2882 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoImprove error messages related to syntax check of backend decls.
phk [Mon, 7 Jul 2008 17:19:32 +0000 (17:19 +0000)]
Improve error messages related to syntax check of backend decls.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2881 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd test-case or syntax-checks of backend decls.
phk [Mon, 7 Jul 2008 17:19:10 +0000 (17:19 +0000)]
Add test-case or syntax-checks of backend decls.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2880 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoAdd -badvcl for VCL code we expect the compiler to whine about.
phk [Mon, 7 Jul 2008 17:16:50 +0000 (17:16 +0000)]
Add -badvcl for VCL code we expect the compiler to whine about.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2879 d4fa192b-c00b-0410-8231-f00ffab90ce4

16 years agoWhite space fix
phk [Mon, 7 Jul 2008 16:33:57 +0000 (16:33 +0000)]
White space fix

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2878 d4fa192b-c00b-0410-8231-f00ffab90ce4