]>
err.no Git - varnish/log
phk [Fri, 4 Aug 2006 19:36:35 +0000 (19:36 +0000)]
More comprehensive performance stats and a few asserts, just in case.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@640
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 4 Aug 2006 11:10:57 +0000 (11:10 +0000)]
Now that we keep track of loaded VCLs in the manager, we might
as well allow their manipulation also when the child is not
running.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@639
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 4 Aug 2006 10:54:30 +0000 (10:54 +0000)]
Redo VCL program handling.
Keep track of all loaded VCL programs in the manager and tell the
child to load them via VCL.
Don't start he acceptor thread until a "start" command cones down
the CLI.
XXX: Right now we leak stuff when a VCL program is dicarded
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@638
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 4 Aug 2006 10:23:51 +0000 (10:23 +0000)]
Redo our management of compiled VCL programs:
Take default_vcl out of heritage.
Keep track of all compiled VCL files and delete them at
exit.
After starting child, use CLI to load all vcl programs
and then issue "start" via the CLI.
In the cacher, don't start the acceptor until we get
a start command.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@637
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 4 Aug 2006 09:19:40 +0000 (09:19 +0000)]
Move VCL compiler related stuff to mgt_vcc.c
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@636
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 4 Aug 2006 09:06:40 +0000 (09:06 +0000)]
Remove old cli related stuff, it now lives elsewhere
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@635
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 4 Aug 2006 09:06:07 +0000 (09:06 +0000)]
reimplement CLI stats
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@634
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 4 Aug 2006 07:21:50 +0000 (07:21 +0000)]
Implement CLI ping in manager, this is a "per hop" command.
Add mgt_cli_askchild() function to poke the CLI interface to
the child.
Use it to ping the child every second.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@633
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 4 Aug 2006 07:20:49 +0000 (07:20 +0000)]
Move cli_func_ping to common_cli
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@632
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 4 Aug 2006 07:19:51 +0000 (07:19 +0000)]
SIGCHLD has already been taken care of earlier.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@631
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 4 Aug 2006 06:53:26 +0000 (06:53 +0000)]
Change the CLI protocol in a subtle but useful way:
The first line of the response has a fixed format ("%-3d %-8u\n")
and consequently fixed length (CLI_LINE0_LEN == 13).
This makes parsing responses more efficient. Add a function
in common_cli to do so.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@630
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 4 Aug 2006 06:23:08 +0000 (06:23 +0000)]
(Re)Implement passthru of cli commands, we can now talk with the
cache process again.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@629
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 4 Aug 2006 06:21:56 +0000 (06:21 +0000)]
Add CLIS_CANT status code for when something is valid but currently
impossible.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@628
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 4 Aug 2006 06:21:32 +0000 (06:21 +0000)]
Typo: write cli result to correct pipe.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@627
d4fa192b -c00b-0410-8231-
f00ffab90ce4
andersb [Thu, 3 Aug 2006 23:42:47 +0000 (23:42 +0000)]
Placed a new sbuf_clear at a more strategic place. It got cluttered when a host left without SessionClose of SessionReuse.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@626
d4fa192b -c00b-0410-8231-
f00ffab90ce4
andersb [Thu, 3 Aug 2006 22:01:51 +0000 (22:01 +0000)]
Got a workaround for IP adress fetching. If we connect logger while Varnish is running, we won't catch the IP from SessionOpen since it's already done that. Workaround is to catch the IP from SessionReuse if IP of session is NULL
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@625
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Thu, 3 Aug 2006 19:21:55 +0000 (19:21 +0000)]
Fix copy&paste bug in fetch_chunked.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@624
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Thu, 3 Aug 2006 19:20:02 +0000 (19:20 +0000)]
Sanitycheck that the length of an object adds up, right when we
fetch it.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@623
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Thu, 3 Aug 2006 11:46:52 +0000 (11:46 +0000)]
Imlement stopping and restarting of child process.
Not as useful as it will be yet, see ticket 22
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@622
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Thu, 3 Aug 2006 11:45:23 +0000 (11:45 +0000)]
Make the pipe-stunt debug process smarter.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@621
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Thu, 3 Aug 2006 10:37:22 +0000 (10:37 +0000)]
Take varnishtester out of the loop until it can be de-libevented
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@620
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Thu, 3 Aug 2006 10:37:01 +0000 (10:37 +0000)]
Add stop command as well.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@619
d4fa192b -c00b-0410-8231-
f00ffab90ce4
andersb [Thu, 3 Aug 2006 10:16:20 +0000 (10:16 +0000)]
Think I have found a program structure that works. Filling in bits to build logline.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@618
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Thu, 3 Aug 2006 09:45:36 +0000 (09:45 +0000)]
Remove libevent from the picture.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@617
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Thu, 3 Aug 2006 09:45:14 +0000 (09:45 +0000)]
Rip out the old CLI handling and start over, more or less.
Still bits missing.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@616
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Thu, 3 Aug 2006 06:45:58 +0000 (06:45 +0000)]
Rework the cache process CLI handling:
We are only accepting CLI from the pipes in heritage, so simply
run a loop reading those, dispatching lines as we see them.
Export CLI_cmds[] so that the management process can see it,
we might as well take advantage of the shared binary where we can.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@615
d4fa192b -c00b-0410-8231-
f00ffab90ce4
andersb [Wed, 2 Aug 2006 22:53:56 +0000 (22:53 +0000)]
Added SessionReuse so I now write a logline for SessionClose and SessionReuse.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@614
d4fa192b -c00b-0410-8231-
f00ffab90ce4
andersb [Wed, 2 Aug 2006 22:33:31 +0000 (22:33 +0000)]
Starting to get the structure right (I think). Thx for the NULL on each string Poul-Hennning :)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@613
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 2 Aug 2006 20:59:46 +0000 (20:59 +0000)]
Add an assert, just in case.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@612
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 2 Aug 2006 20:54:40 +0000 (20:54 +0000)]
Fix a bug when deleting items in the binheap
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@611
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 2 Aug 2006 19:12:01 +0000 (19:12 +0000)]
log StatAddr with fd=0 to avoid out-of-order confusion
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@610
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 2 Aug 2006 18:17:49 +0000 (18:17 +0000)]
Allow ENOENT on removing kqueue events, a close will have drained
them already.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@609
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 2 Aug 2006 18:12:42 +0000 (18:12 +0000)]
Tell daemon(3) to not chdir in debugging mode so we can find our core dumps.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@608
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 2 Aug 2006 17:45:02 +0000 (17:45 +0000)]
Enter pass mode through the front door.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@607
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 2 Aug 2006 17:27:33 +0000 (17:27 +0000)]
More asserts, sp->vbc this time.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@606
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 2 Aug 2006 15:55:06 +0000 (15:55 +0000)]
Remember to clear sp->vbc
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@605
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 2 Aug 2006 13:28:14 +0000 (13:28 +0000)]
Don my plumbers outfit and twist a lot of pipes into shape:
When -d(ebug) is specified we fork before calling daemon.
The parent process becomes a miniature cat(1) program which connects
stdin/stdout with the management process stdin/stdout.
It also knows that SIGINT should be passed on to the management process
in order to make it DTRT.
Any other cause of death for this "debugger" process will (once I
teach the CLI about it) not affect the running varnish and therefore
it will be possible to start varnish in debugging mode, tweak things
a bit and CTRL-D and leave it running in the properly daemon(3)'ed
background.
The reason for this rather complicated bit of pipework is that we
can not call daemon(3) once we have started any threads (only the
calling thread survives) and we would loose our parent relationship
to the cache process also.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@604
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 2 Aug 2006 12:05:19 +0000 (12:05 +0000)]
Typo: Also monitor remote sockets with the poll based acceptor.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@603
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 2 Aug 2006 11:58:54 +0000 (11:58 +0000)]
Remove the libevent from the backend pool manager.
Simplify the logic here while we're at it.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@602
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 2 Aug 2006 11:18:11 +0000 (11:18 +0000)]
Add <stdarg.h> include
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@601
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 2 Aug 2006 11:17:53 +0000 (11:17 +0000)]
Remove unused struct.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@600
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 2 Aug 2006 10:53:49 +0000 (10:53 +0000)]
Simplify backend connection memory management.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@599
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 2 Aug 2006 10:40:22 +0000 (10:40 +0000)]
Replace libevent based acceptor with poll(2) based acceptor.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@598
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 2 Aug 2006 09:34:40 +0000 (09:34 +0000)]
Bite the bullet and write an alternate acceptor which uses kqueue
directly instead of libevent.
Degeneralize the header reading code in cache_http.c which seems to
be cleaner anyway.
An #ifdef at the top of cache_acceptor.c selects which implementation
you want: libevent or kqueue.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@597
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 2 Aug 2006 07:23:45 +0000 (07:23 +0000)]
Convert pipe to use poll(2) on the two filedescriptors it cares about
and eliminate the per-workerthread event engine entirely.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@596
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 2 Aug 2006 07:07:56 +0000 (07:07 +0000)]
I have nothing but circumstantial evidence that libevent is involved
in the current stack corruption I see, but we might as well avoid
using it where we can:
Don't engage the eventengine when we talk to the backend, just call
read(2) directly.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@595
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 2 Aug 2006 04:57:58 +0000 (04:57 +0000)]
More miniobj paranoia
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@594
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 1 Aug 2006 19:48:36 +0000 (19:48 +0000)]
More miniobj checks
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@593
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 1 Aug 2006 17:54:34 +0000 (17:54 +0000)]
More miniobj checks
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@592
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 1 Aug 2006 16:42:37 +0000 (16:42 +0000)]
More miniobj checks
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@591
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 1 Aug 2006 16:26:10 +0000 (16:26 +0000)]
more miniobj checks
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@590
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 1 Aug 2006 15:09:20 +0000 (15:09 +0000)]
Flinting.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@589
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 1 Aug 2006 15:08:54 +0000 (15:08 +0000)]
Make 32bit limitation work better.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@588
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 1 Aug 2006 15:08:36 +0000 (15:08 +0000)]
Fixx off by one error.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@587
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 1 Aug 2006 14:53:29 +0000 (14:53 +0000)]
Add miniobj checks om SMF and STORAGE
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@586
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 1 Aug 2006 12:38:26 +0000 (12:38 +0000)]
This is getting too longhaired: Give backend connections another
http header which we can use to build the object headers in.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@585
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 1 Aug 2006 12:04:56 +0000 (12:04 +0000)]
Experiment: don't use req's workspace to build object http header.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@584
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 1 Aug 2006 09:39:52 +0000 (09:39 +0000)]
Record timestamp when we have received completed HTTP request header,
and define this as the "start of request timestamp".
Define "end of request timestamp" as when we are ready to transmit
HTTP header back.
SHMlog the start and difference between start and stop with ReqServTime
tag.
Keep track of idle sessions using CLOCK_MONOTONIC to avoid trouble
here should our clock get stepped.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@583
d4fa192b -c00b-0410-8231-
f00ffab90ce4
andersb [Mon, 31 Jul 2006 22:21:02 +0000 (22:21 +0000)]
Added some more toying with the data. All is still a mess, and I am not sure of structure yet. PHK is also doing changes in areas that will be needed.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@582
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 31 Jul 2006 22:09:42 +0000 (22:09 +0000)]
Always NUL terminate shmlog entries.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@581
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 31 Jul 2006 21:49:29 +0000 (21:49 +0000)]
Create three groups of seven SHMlog tags:
{Rx,Tx,Obj}{Request,Response,Status,URL,Protocol,Header,LostHeader}
And log http header munching accordingly.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@580
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 31 Jul 2006 21:46:32 +0000 (21:46 +0000)]
Remove unused variable
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@579
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 31 Jul 2006 21:37:10 +0000 (21:37 +0000)]
addr might be NULL if we are called from the prefetcher.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@578
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 31 Jul 2006 21:04:43 +0000 (21:04 +0000)]
Add http_ClrHeader() and cure an unintended bug-oid its use exposes:
we checked if the request is a GET long after we should have.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@577
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 31 Jul 2006 20:38:46 +0000 (20:38 +0000)]
Add a http_SetResp() function for constructing HTTP responses (like 304).
Eliminate the header index from http_SetHeader() which is no unused.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@576
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 31 Jul 2006 20:27:02 +0000 (20:27 +0000)]
Log the headers we store in the object under ObjHeader so that
we don't get two confusing batches of TxHeader in the sessions logentries.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@575
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 31 Jul 2006 19:18:26 +0000 (19:18 +0000)]
Fix the dot-graph
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@574
d4fa192b -c00b-0410-8231-
f00ffab90ce4
andersb [Mon, 31 Jul 2006 14:50:36 +0000 (14:50 +0000)]
Initial commit of real structure. This code will print the User-Agent.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@573
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 31 Jul 2006 07:26:25 +0000 (07:26 +0000)]
Introduce http_SetHeader() for setting a http header to a const string,
no need to waste time printf'ing in this case, and no need to waste workspace.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@572
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 31 Jul 2006 07:13:45 +0000 (07:13 +0000)]
Don't fill more than half the workspace with received data, we need to
have space for composing the reply as well.
Without this fix, the entire workspace could be filled with pipelined
requests and we would have no space to compose the reply.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@571
d4fa192b -c00b-0410-8231-
f00ffab90ce4
des [Mon, 31 Jul 2006 06:36:56 +0000 (06:36 +0000)]
Clone varnishncsa off of varnishlog. Anders will hack on it to produce
NCSA-style (common / combined) logs.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@570
d4fa192b -c00b-0410-8231-
f00ffab90ce4
des [Mon, 31 Jul 2006 06:24:51 +0000 (06:24 +0000)]
Unbreak build.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@569
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 28 Jul 2006 13:41:20 +0000 (13:41 +0000)]
"HEAD" has 4 characters.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@568
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 24 Jul 2006 10:13:29 +0000 (10:13 +0000)]
remove this file (again)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@567
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sat, 22 Jul 2006 22:01:04 +0000 (22:01 +0000)]
reorg a little bit.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@566
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sat, 22 Jul 2006 21:20:08 +0000 (21:20 +0000)]
Eliminate redundant args from stevedore->send()
Have WRK_Write() and friends return number of bytes (we can't use
WRK_Flush() as that may act on both header and body).
Collect more stats.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@565
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sat, 22 Jul 2006 20:57:02 +0000 (20:57 +0000)]
Add per address, per session and total statistics.
We (will) collect data in unlocked per workerthread accumulators
and whenever the workerthread leaves the session, we charge the
bill to the srcaddr (issuing a StatAddr shmrecord), to the session
and to the global counters in the stats struct.
When sessions die we issue a StatSess shmrecord.
StatAddr and StatSess has the same format:
address
port (always zero for StatAddr)
duration (seconds)
#sessions
#requests
#pipe
#pass
#fetch
#hdrbytes
#bodybytes
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@564
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sat, 22 Jul 2006 16:55:17 +0000 (16:55 +0000)]
Make sure there always is a Host: header in fetch requests.
We fill it in with backend.hostname, but this may not be optimal
(direct IP# etc etc) so VCL should be able to override it.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@563
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sat, 22 Jul 2006 16:26:45 +0000 (16:26 +0000)]
Action pass from vcl_hit() needs to go to STP_PASS
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@562
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sat, 22 Jul 2006 16:15:17 +0000 (16:15 +0000)]
Always use GET and HTTP/1.1 against the backend for fetch
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@561
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sat, 22 Jul 2006 13:58:31 +0000 (13:58 +0000)]
exit after error
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@560
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sat, 22 Jul 2006 12:00:18 +0000 (12:00 +0000)]
Implement regexp matching of strings in VCL.
For now we default to REG_EXTENDED, but it might make sense
to let the user control this flag and the case sensitivity.
Another concern is the stringification of regexps, it may lead
to backslash madness. Maybe we should define '...' string types
also and do no backslash substitution in those at all.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@559
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sat, 22 Jul 2006 10:41:00 +0000 (10:41 +0000)]
Change the acl syntax slightly: the ( ... ) should enclose all of
the rule (ie: also ! and /mask if present).
Implement matching for IPv4.
Acl tests are shmlogged as follows (doc candidate):
shmlog tag: VCL_actl
"NO_MATCH $acl"
client did not match access list $acl
"FAIL $acl $rule"
getaddrinfo(3) failed on $rule which had a '!'
"MATCH $acl $rule"
client matched $rule
"NEG_MATCH $acl $rule"
client matched negated (!) $rule
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@558
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sat, 22 Jul 2006 10:35:39 +0000 (10:35 +0000)]
Store the socket address in the session
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@557
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sat, 22 Jul 2006 09:38:09 +0000 (09:38 +0000)]
VCL compiler:
add two sbufs for "init" and "fini" actions.
VCL ACLs: Change syntax and implementation as follows.
ACL Syntax now works the following way:
acl $name {
! ( "myhost.com" ) ;
"10.0.0.1" /8 ;
}
The '!' means not. If the address matches the rest of the rule
the address does NOT match the acl and the search terminates here.
Enclosing the string in paranthesis means that the rule will be ignored
if the string cannot be converted to an address (with getaddrinfo).
When a string can not be looked up, and is not enclosed in a
paranthesis, a positive rule (ie: without !) will not match and a
negative rule (with !) will match.
A mask can always be supplied, no matter the style of the string
given, so it is possible to do things like:
{ "fw.ourcompany.dom" / 24 }
Which means "any host on the same /24 subnet as fw.ourcompany.dom".
Unfortunately getaddrinfo() does not return a TTL for the results,
in the future we may want to use some kind of timeout to refresh
the lookups.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@556
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sat, 22 Jul 2006 08:02:47 +0000 (08:02 +0000)]
Split IP/ACL compilation into vcc_acl.c
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@555
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 21 Jul 2006 22:12:38 +0000 (22:12 +0000)]
Unless the user specifies an explicit size, don't use more than 2GB
on 32 bit architectures to avoid running out of address room
Make FlexeLint happy.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@554
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 21 Jul 2006 21:57:43 +0000 (21:57 +0000)]
Make FlexeLint happier
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@553
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 21 Jul 2006 21:42:00 +0000 (21:42 +0000)]
Drop this one now.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@552
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 21 Jul 2006 21:28:51 +0000 (21:28 +0000)]
Implement TTL adjustment from VCL
Log in shmem where the TTL came from (doc-candidate):
696613561 RFC 900
1153517009 1153517014 1153517914 900 0
| | | | | | | |
| | | | | | | age
| | | | | | max-age
| | | | | Expires: header
| | | | Date: header
| | | "now"
| | TTL relative to "now"
| who set the TTL
xid of object
or
696613561 VCL 20
1153517009
| | | |
| | | "now"
| | TTL relative to "now"
| who set the TTL
xid of object
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@551
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 21 Jul 2006 21:13:43 +0000 (21:13 +0000)]
More VRT work.
Use macros for trivial objects which are just a field in a struct.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@550
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 21 Jul 2006 21:01:45 +0000 (21:01 +0000)]
Update VRT to minimal functional level again
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@549
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 21 Jul 2006 20:51:24 +0000 (20:51 +0000)]
Use const char* for safety
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@548
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 21 Jul 2006 20:45:13 +0000 (20:45 +0000)]
Update
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@547
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 21 Jul 2006 20:44:58 +0000 (20:44 +0000)]
This file is generated.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@546
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 21 Jul 2006 20:43:56 +0000 (20:43 +0000)]
Automate generation of tables and prototypes for the objects which
VCL programs can manipulate.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@545
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 21 Jul 2006 18:12:56 +0000 (18:12 +0000)]
Move things over to the correct "VCC" prefix.
Split some stuff into separate files while we're at it.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@544
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 21 Jul 2006 16:25:24 +0000 (16:25 +0000)]
update comment
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@543
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 21 Jul 2006 16:15:58 +0000 (16:15 +0000)]
Properly log TTL calculation to shmem
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@542
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 21 Jul 2006 16:06:07 +0000 (16:06 +0000)]
Fix formatting of responses.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@541
d4fa192b -c00b-0410-8231-
f00ffab90ce4