]>
err.no Git - varnish/log
phk [Tue, 17 Jun 2008 10:13:03 +0000 (10:13 +0000)]
When running in -d -d mode, close all telnet sockets when stdin closes.
... But do not do this for the single -d mode.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2724
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 17 Jun 2008 10:11:44 +0000 (10:11 +0000)]
Fix another corner case in teardown of the event manager.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2723
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 17 Jun 2008 09:37:44 +0000 (09:37 +0000)]
Fix broken logic in the poll-fd compaction function, which resulted in
a panic during this sequence:
varnishd -d -d -T :8082
ctrl-D
telnet localhost 8082 (from other terminal)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2722
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 17 Jun 2008 09:21:58 +0000 (09:21 +0000)]
Hack up a crude debugging facility for the event manager.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2721
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 17 Jun 2008 08:57:46 +0000 (08:57 +0000)]
Use POLLIN instead of POLLRDNORM
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2720
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 17 Jun 2008 08:18:42 +0000 (08:18 +0000)]
Assert that the event manager found something for each pending fd.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2719
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 17 Jun 2008 08:03:58 +0000 (08:03 +0000)]
Add varnish -wait and make varnish -stop mean the logical thing
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2718
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 17 Jun 2008 07:53:21 +0000 (07:53 +0000)]
Add a -vcl+backend argument to the varnish command which autogenerates
backend stanzas for the servers we know about.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2717
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 17 Jun 2008 07:37:27 +0000 (07:37 +0000)]
Use vsb_newauto() macro throughout
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2716
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 17 Jun 2008 07:32:43 +0000 (07:32 +0000)]
allow delays in http procssing (client & server)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2715
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 17 Jun 2008 07:30:16 +0000 (07:30 +0000)]
Add -vcl option varnish command, to load inline VCL code.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2714
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 17 Jun 2008 07:24:20 +0000 (07:24 +0000)]
Add a vsb_newauto() macro
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2713
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 17 Jun 2008 07:10:14 +0000 (07:10 +0000)]
Add a delay command, it takes second.fraction and uses usleep()
below 100s and sleep() over.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2712
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 17 Jun 2008 07:04:03 +0000 (07:04 +0000)]
We don't want a separate vcl command, it will be a subcommand of the
varnish command.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2711
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 16 Jun 2008 22:31:27 +0000 (22:31 +0000)]
remove redundant -repeat 1
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2710
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 16 Jun 2008 22:16:40 +0000 (22:16 +0000)]
Add the first test-case that involves a varnish process
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2709
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 16 Jun 2008 22:15:27 +0000 (22:15 +0000)]
Use 9081 as default server address
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2708
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 16 Jun 2008 22:14:56 +0000 (22:14 +0000)]
Add CLI asking function.
Get pipe magic right.
Add brutal stop function.
See the first test transaction get through.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2707
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 16 Jun 2008 22:13:52 +0000 (22:13 +0000)]
Show servers listen address.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2706
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 16 Jun 2008 22:10:52 +0000 (22:10 +0000)]
Make sure backend connections are blocking before we need them to be.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2705
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 16 Jun 2008 21:58:57 +0000 (21:58 +0000)]
Move cli_func_ping() prototype where it belongs.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2704
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 16 Jun 2008 21:28:18 +0000 (21:28 +0000)]
Add code to launch a varnish instance and open a CLI connection to it
via TELNET.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2703
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 16 Jun 2008 21:27:26 +0000 (21:27 +0000)]
Use VSS_open()
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2702
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 16 Jun 2008 21:25:36 +0000 (21:25 +0000)]
Add VSS_open(const char *str) for when you just want a connection and
don't really care about addresses and all that.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2701
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 16 Jun 2008 07:10:47 +0000 (07:10 +0000)]
Enforce server and client name initials as 's' and 'c' respectively.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2700
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 21:25:41 +0000 (21:25 +0000)]
Allow varnishd to be started with neither -b nor -f, this is useful
where a central facility is used to push VCL's to a number of Varnish
hosts.
Until a VCL is loaded, the child process cannot be started.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2699
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 21:11:19 +0000 (21:11 +0000)]
Add a Reset pass after each testfile
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2698
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 20:57:30 +0000 (20:57 +0000)]
Add -start and -wait for clients for async execution
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2697
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 20:57:08 +0000 (20:57 +0000)]
More test-cases
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2696
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 20:50:24 +0000 (20:50 +0000)]
Describe tests with test keyword
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2695
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 20:49:27 +0000 (20:49 +0000)]
Add "test" keyword for printing a test description
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2694
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 20:41:35 +0000 (20:41 +0000)]
No longer relevant
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2693
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 20:41:04 +0000 (20:41 +0000)]
Two first testcases
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2692
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 20:37:52 +0000 (20:37 +0000)]
Polishing
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2691
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 19:55:49 +0000 (19:55 +0000)]
Wrap two level 1 messages around each test file.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2690
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 19:53:36 +0000 (19:53 +0000)]
Flexelint
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2689
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 19:52:34 +0000 (19:52 +0000)]
Make the HTTP expect work for trivial cases.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2688
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 19:32:02 +0000 (19:32 +0000)]
Regularize a couple of messages.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2687
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 16:11:17 +0000 (16:11 +0000)]
Get a fair bit further in parsing HTTP stuff.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2686
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 15:43:21 +0000 (15:43 +0000)]
On further consideration: give VCT it's own header file.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2685
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 15:40:39 +0000 (15:40 +0000)]
Polish VCT a bit more.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2684
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 15:30:49 +0000 (15:30 +0000)]
Add VCT: a RFC2616 ctype
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2683
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 13:36:50 +0000 (13:36 +0000)]
FlexeLint varnishtest
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2682
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 13:16:18 +0000 (13:16 +0000)]
Add http txresponse
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2681
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 13:09:21 +0000 (13:09 +0000)]
Function to receive a HTTP header, as request or response.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2680
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 12:45:53 +0000 (12:45 +0000)]
Implement http::txreq
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2679
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 12:44:10 +0000 (12:44 +0000)]
Implement backslash-newline escapes.
Implement "" quoting of strings.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2678
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 12:15:47 +0000 (12:15 +0000)]
Propset svn:keywords and add $Id
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2677
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 12:13:24 +0000 (12:13 +0000)]
Add $Id$
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2676
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 12:08:11 +0000 (12:08 +0000)]
Add the HTTP subprocessor
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2675
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 11:47:01 +0000 (11:47 +0000)]
Hash out the client, up to and including connection to the server.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2674
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 11:30:13 +0000 (11:30 +0000)]
Default server to repeat=1.
Accept connections, and close them right away.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2673
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 11:22:55 +0000 (11:22 +0000)]
Make the first testcase a test of the testprogram
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2672
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 11:17:45 +0000 (11:17 +0000)]
Server socket & thread creation
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2671
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 10:50:15 +0000 (10:50 +0000)]
put varnishtest under auto* control
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2670
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 10:49:11 +0000 (10:49 +0000)]
Remove BSD style makefile
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2669
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 10:00:33 +0000 (10:00 +0000)]
Add LICENSE
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2668
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 09:57:28 +0000 (09:57 +0000)]
Hash out more files and cmd functions
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2667
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 15 Jun 2008 09:50:13 +0000 (09:50 +0000)]
Add Skelton "varnishtest" program.
This is a test-driver which will be able to drive low-level tests of
varnish functionalty.
The present code manages to parse the example testcase description,
more work to follow.
XXX: needs to be auto*'ed, right now it uses FreeBSD makefile syntax.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2666
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sat, 14 Jun 2008 14:26:59 +0000 (14:26 +0000)]
Change defaults:
Make Grace mode the default with 10 seconds (param: default_grace)
Make the thread idle timeout 300 seconds (param: thread_pool_timeout)
Max one new thread per 20 msec (param: thread_pool_add_delay)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2665
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sat, 14 Jun 2008 14:14:28 +0000 (14:14 +0000)]
Slightly change the criteria for starting new worker threads: Don't
do it if the number of queued threads dropped since last inspection.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2664
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 11 Jun 2008 21:12:26 +0000 (21:12 +0000)]
Add an optional shortcut:
The parameter session_linger determines how many milliseconds the
workerthread waits to see if another request has arrived, before
handing the session over to the session herder.
If we manage to catch the next request this way, we save a number
of semi-expensive steps, if we hang around too long, the worker-thread
gets to goof off.
A relatively small sample of data from a live server, indicates
that 20% of all requests arrive within 50 msec of the previous
request and 50% within 100msec.
It is not clear at present how these timeintervals relate to client
RTT, or if they are systematically too high, due to the duration
of the detour over the herder.
There is a new line in varnishstat keeping track of how many times
this gamble succeeds.
Experimentation is encouraged.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2663
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 11 Jun 2008 20:50:55 +0000 (20:50 +0000)]
Be a little less hysteric with charging session statistics to
srcaddr and global counters.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2662
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 10 Jun 2008 14:37:14 +0000 (14:37 +0000)]
Refactor the fields of struct acct so we don't have to remember them three
different places in the code.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2661
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 10 Jun 2008 13:29:08 +0000 (13:29 +0000)]
Make this compile under OS/X 10.5 Leopard
Submitted by: peter
Closes: 245
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2660
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 9 Jun 2008 13:35:35 +0000 (13:35 +0000)]
Slight backtracking: Store the specified socket name in the listen socket
structure, instead of whatever we actually bound to. It is more informative
and intuitive.
Report the listen socket spec in the SessionOpen shm record.
Close listen sockets as soon as we have forked the child, this eliminated
a fd-leak when a socket was eliminated from listen_address while the child
ran.
Fix various potential problems related to not being able to bind to one
or more listen addresses.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2659
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 9 Jun 2008 13:11:45 +0000 (13:11 +0000)]
Don't leak listen address structures if we fail to bind to them.
Associate ascii representation addr/port strings with each listen
socket, already in the manager process.
Postpone listen(2) call until client is ready, to limit initial
connection spike.
XXX: I still miss an unlisten(2).
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2658
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 9 Jun 2008 13:01:27 +0000 (13:01 +0000)]
Add a VSS_bind() function, using the meat of VSS_listen()
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2657
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 9 Jun 2008 08:35:38 +0000 (08:35 +0000)]
Style & Polish.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2656
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 9 Jun 2008 08:12:31 +0000 (08:12 +0000)]
Properly lock n_wrk* statics variables without using more lock operations.
Have the worker threads add themselves to the pool, while the hold the pool
lock anyway.
Collect stats per pool, and have the decimator aggregate over all pools
and into the shared memory counters.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2655
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 8 Jun 2008 20:42:28 +0000 (20:42 +0000)]
If we decide not to eliminate the worker thread, properly do so.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2654
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sat, 7 Jun 2008 21:19:58 +0000 (21:19 +0000)]
Redo the way we manage the thread pool(s).
This is necessary to generalize the thread pools to do other tasks
for us in the future.
Please read the descriptions of the new and changed thread_pool*
parameters carefully before you tweak them, some of them have
slightly different meanings now.
The high-level view of this is that we now have dedicated a thread to
adding threads to the pools, in addition to the thread we already
had that killed idle threads from the pools.
The difference is that this new thread is quite a bit more reluctant
to add threads than the previous code, which would add a thread any
time it could get away with it.
Hopefully that reduces the tendency for thread-pile-ups.
This commit also reduces the cross-pool locking contention by making
the overflow queue a per pool item.
The down side of that is that more of the stats counters have become
unlocked and thus can get out of sync if two threads race when updating
them. This is an XXX item.
Thanks to Anders Nordby for testing this patch.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2653
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 6 Jun 2008 21:50:17 +0000 (21:50 +0000)]
Spell "X-Forwarded-for" as "X-Forwarded-For", this seems to match the
unwritten lore better.
Closes 203
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2652
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 6 Jun 2008 10:42:55 +0000 (10:42 +0000)]
Duh!
I had the sense of FIONBIO args right in the first place.
Revert 2647 and promise not to commit when sleepy.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2651
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Thu, 5 Jun 2008 09:19:27 +0000 (09:19 +0000)]
Add an XXX comment.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2650
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Thu, 5 Jun 2008 09:18:09 +0000 (09:18 +0000)]
We don't need srandomdev.h here anymore.
Don't hand-roll an assert.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2649
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Thu, 5 Jun 2008 09:16:29 +0000 (09:16 +0000)]
Add a new-line before, and reword some of the default cautions a little
bit.
Automatically calculate the margin, based on the width of the parameter
names we have.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2648
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Thu, 5 Jun 2008 09:12:51 +0000 (09:12 +0000)]
Get the sign right on FIONBIO ioctl.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2647
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 2 Jun 2008 19:45:05 +0000 (19:45 +0000)]
Add a "timeout counter" and cleans the timeout sockets every 60
seconds instead of cleaning it in every new connection received.
We are using it here, and the performance is much better now.
Submmitted by: Rafael Umann <rafael.umann@terra.com.br>
Closes ticket #235
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2646
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sat, 31 May 2008 21:26:20 +0000 (21:26 +0000)]
Overhaul the regexp purge/ban code, with a detour around the CLI code.
CLI code:
In CLI help, don't list commands with no syntax description.
Add a CLI_HIDDEN macro to construct such entries. They are
useful as backwards compatibility entries which we do not want
to show in the help.
CLI interface to BAN (purge) code:
Get the CLI names right for purging so they are purge.FOO instead
of FOO.purge.
This means that you should use "purge.url" and "purge.hash"
instead of "url.purge" and "hash.purge".
Add compat entries for the old, and keep them through the 2.x
release series.
Add purge.list command to list purges currently in effect.
NB: This is not 100% locking safe, so don't abuse it.
BAN (purge) code:
Add reference counting and GC to bans.
Since we now have full reference counting, drop the sequence
number based soft references and go to "hard" pointer
references from the object to the purges.
Give the "ban" structure the miniobj treatment while we are
at it.
The cost of this is a lock operation to update refcounts
once all applicable bans have been checked on an object.
There is no locking cost if there is no bans to check.
Add explicit call to new BAN_DestroyObj() when objects are
destroyed to release the refcount.
When we release an object refcount in BAN_DestroyObj(),
check if we can destroy the last purge in the list also.
We only destroy one ban per BAN_DestroyObj() call, to avoid
getting stuck too long time, (tacitly assuming that we will
destroy more objects than bans.)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2645
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sat, 31 May 2008 09:34:28 +0000 (09:34 +0000)]
Go over the Telnet/CLI code in the manager process.
Implement "quit" (ticket 125) and drop the planned aliases.
Add CLIS_CLOSE return status, to communicate that close is happening.
Fix logical bug in fd-table allocation bug in event-engine.
Plug memory leak in CLI session destruction.
Increase listen depth of telnet socket to 10.
Ignore trailing whitespace and empty CLI input lines.
Log CLI sessions and commands into syslog.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2644
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 30 May 2008 22:25:58 +0000 (22:25 +0000)]
I belive this fixes the ESI issue that JT Justman has reported.
(no ticket)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2643
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 30 May 2008 22:18:26 +0000 (22:18 +0000)]
Add a new backend attribute in VCL: "connect_timeout".
This is how long time we wait for a TCP connection to the backend to
become established.
Typical usage:
backend b1 {
.host = "hex";
.port = "80";
.connect_timeout = 500 ms;
}
It can also be used in backends in director declarations.
Also add a parameter called "connect_timeout" which sets the default
to 400 msec (a number pulled out of my old black magicians hat).
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2642
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 30 May 2008 21:39:56 +0000 (21:39 +0000)]
Back in the mists of time, the SocketWizards were so happy to get
any connections at all, that they didn't even consider that maybe
connect(2) should have a timeout argument.
Add TCP_connect() which addresses this shortcoming, using what I
belive is a widely supported workaround.
Not to POSIX: please fix.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2641
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 27 May 2008 07:10:22 +0000 (07:10 +0000)]
Add a new vcl function regsuball()
It works just like regsub(), but replaces all occurrences of the regexp.
regsub("1foofoofoo2", "foo", "bar") -> "1barfoofoo2"
regsuball("1foofoofoo2", "foo", "bar") -> "1barbarbar2"
Fixes ticket 238
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2640
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 26 May 2008 10:13:52 +0000 (10:13 +0000)]
Be more consistent about sockets and blocking/non-blocking mode:
Accept sockets are non-blocking, to avoid races where the client closes
before we get to accept it. (Spotted by: "chen xiaoyong")
Unfortunately, that means that session sockets inherit non-blocking mode,
which is the opposite of what we want in the worker thread but correct
for the acceptor thread.
We prefer to have the extra syscalls in the worker thread, that complicates
things a little bit.
Use ioctl(FIONBIO) instead of fcntl(2) which is surprisingly expensive.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2639
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 26 May 2008 09:14:23 +0000 (09:14 +0000)]
Backend sockets are always in blocking mode.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2638
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 26 May 2008 08:38:00 +0000 (08:38 +0000)]
Add TCP_blocking() and TCP_nonblocking() and use them instead of
fondling fcntl(2) directly.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2637
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 26 May 2008 08:36:18 +0000 (08:36 +0000)]
Add compiler command for Solaris.
Closes ticket #239
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2636
d4fa192b -c00b-0410-8231-
f00ffab90ce4
ssm [Thu, 24 Apr 2008 06:37:01 +0000 (06:37 +0000)]
Example VCL: Cleanup and update for varnish version >= 1.2
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2634
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 21 Apr 2008 07:01:20 +0000 (07:01 +0000)]
Remove an assert which is no longer true in the case of a non-headered
(not-RFC2616 compliant) request.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2633
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 21 Apr 2008 06:33:37 +0000 (06:33 +0000)]
Make it possible for the acceptor to provide a method by which sessions
are passed to it.
If no method is provided, we fall back to vca_pipes.
closes #227
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2632
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Thu, 17 Apr 2008 20:08:49 +0000 (20:08 +0000)]
Missing handling of sp->restarts and sp->director.
Spotted by: "postwait"
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2631
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 16 Apr 2008 07:58:43 +0000 (07:58 +0000)]
SIZE_MAX is not spelled SIZE_T_MAX in polite company.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2630
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 8 Apr 2008 15:34:57 +0000 (15:34 +0000)]
Polish up the malloc allocator to make it more useful for test and
debugging:
Implement an upper limit for allocated memory, specify as:
-smalloc,40M
Give the malloc allocator its own stats counters so we can see deeply
into what it does.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2629
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 8 Apr 2008 15:33:30 +0000 (15:33 +0000)]
Remove trailing blank from error message
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2628
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 8 Apr 2008 15:33:08 +0000 (15:33 +0000)]
Wrap long line
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2627
d4fa192b -c00b-0410-8231-
f00ffab90ce4
bahner [Thu, 3 Apr 2008 17:15:58 +0000 (17:15 +0000)]
svn-externals debian svn://svn.debian.org:/svn/pkg-varnish/packages/varnish/trunk/debian
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2626
d4fa192b -c00b-0410-8231-
f00ffab90ce4
bahner [Wed, 2 Apr 2008 09:42:16 +0000 (09:42 +0000)]
Debian pakking er flyttet til svn://svn.debian.org/svn/pkg-varnish/packages/varnish/debian
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2618
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 31 Mar 2008 22:07:15 +0000 (22:07 +0000)]
Emit an extra CR+NL after the end of chunked encoding.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2617
d4fa192b -c00b-0410-8231-
f00ffab90ce4