Mailing List Archive

Planning for 1.0.4
There are a number of improvements in trunk (and branches/1.0) which I
would like to release as 1.0.4.

I am thinking primarily of trunk as of r1288 (or branches/1.0 as of
r1331, no thanks to svk). However, I'd like to ask you if there are
any newer changes you think should be included. I think r1364-r1369
(autoconf cleanup + missing include) are good candidates. So are the
varnishncsa changes I made last week, but they need a shakedown.

I've included a log of all the changes in trunk since r1288.

Other priorities for 1.0.4: unify init scripts and out-of-the-box
configurations across distributions, and include an init script for
varnishlog.

The target date is May 20, which is exactly three weeks from today.

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no

-------------- next part --------------
------------------------------------------------------------------------
r1289 | phk | 2007-03-30 21:11:15 +0000 (Fri, 30 Mar 2007) | 21 lines

Overhaul compiler to get rid of memory leaks and other bogons.

Add a memlist to the tokenlist and a function which allocates
with malloc(3) and hangs the piece on the memlist of tokenlist.
At the end of compilation, we ditch everything on the list.

Handle vrt_obj.h like the other #includes, and stuff these
into a vsb instead of directly to a file.

Free decoded token string, if any.

Pull creation and destruction of tokenlist into separate functions
for code clarity. Remember to destry everything in the tokenlist.

Pull invocation of cc(1) into a separate function and change the
way we do it, so we get any cc(1) groans and whines back in the
vsb so a CLI user will see them. More errorchecks than before.

More comments throughout.


------------------------------------------------------------------------
r1290 | phk | 2007-03-31 07:43:05 +0000 (Sat, 31 Mar 2007) | 2 lines

Improve error message layout and information.

------------------------------------------------------------------------
r1291 | phk | 2007-03-31 08:36:31 +0000 (Sat, 31 Mar 2007) | 8 lines

Overhaul cross reference checks in vcc compiler

Move and isolate cross reference stuff to it's own source file
(vcc_xref.c) and use vcc_ prefix as originally intended.

Also warn about multiple definitions of objects.


------------------------------------------------------------------------
r1292 | phk | 2007-03-31 18:19:07 +0000 (Sat, 31 Mar 2007) | 2 lines

Pidgin BNF syntax of VCL

------------------------------------------------------------------------
r1293 | phk | 2007-03-31 18:20:33 +0000 (Sat, 31 Mar 2007) | 3 lines

Fix typo, so we correctly recognize '-=' as T_DECR token.


------------------------------------------------------------------------
r1294 | phk | 2007-03-31 18:21:14 +0000 (Sat, 31 Mar 2007) | 4 lines

Better syntax checking of "set" statements.

Remove inapplicable comment.

------------------------------------------------------------------------
r1295 | phk | 2007-04-01 08:23:48 +0000 (Sun, 01 Apr 2007) | 3 lines

I got confused about the terminology. An action is something we do
in the program, a "return" is when we quit the program.

------------------------------------------------------------------------
r1296 | phk | 2007-04-01 08:37:52 +0000 (Sun, 01 Apr 2007) | 7 lines

Split the parsing of actions into a separate file, this is the bit
I expect to grow the most in the near future and all actions have
a lot more in common, than they have with conditionals etc.

Apply more vcc_ prefixes.


------------------------------------------------------------------------
r1297 | phk | 2007-04-01 08:48:08 +0000 (Sun, 01 Apr 2007) | 6 lines

Introduce table based search for actions, and make "set" the first one.

This eliminates the need to have the identifier "set" be its own token
rather than being a simple ID.


------------------------------------------------------------------------
r1298 | phk | 2007-04-01 09:07:44 +0000 (Sun, 01 Apr 2007) | 3 lines

Implement the returns with the new ID based table and eliminate their
corresponding dedicated tokens.

------------------------------------------------------------------------
r1299 | phk | 2007-04-01 09:17:52 +0000 (Sun, 01 Apr 2007) | 3 lines

Eliminate the "proof of concept" tokens that were never implemented
at runtime.

------------------------------------------------------------------------
r1300 | phk | 2007-04-01 09:34:28 +0000 (Sun, 01 Apr 2007) | 4 lines

Move backend parsing into a separate file.
Eliminate a bunch of of unnecessary #includes.


------------------------------------------------------------------------
r1301 | phk | 2007-04-01 15:33:56 +0000 (Sun, 01 Apr 2007) | 9 lines

Remove unused METHOD token.

Improve error handling for unterminated /* ... */ comments.

Add undocumented and unsupported facility for inline C source code
in VCL programs. The syntax is "C{ getpid(); }C" and you are on
your own if you use this.


------------------------------------------------------------------------
r1302 | phk | 2007-04-01 15:34:24 +0000 (Sun, 01 Apr 2007) | 2 lines

Update

------------------------------------------------------------------------
r1303 | phk | 2007-04-01 18:18:54 +0000 (Sun, 01 Apr 2007) | 4 lines

Fix char position in error messages to be [1...] instead of [0...]

Fix typo in /* ... */ handling

------------------------------------------------------------------------
r1304 | phk | 2007-04-01 19:01:38 +0000 (Sun, 01 Apr 2007) | 2 lines

Various nitpicking prompted by flexelint

------------------------------------------------------------------------
r1305 | phk | 2007-04-01 19:13:07 +0000 (Sun, 01 Apr 2007) | 2 lines

remove XXX comment which no longer applies

------------------------------------------------------------------------
r1306 | phk | 2007-04-09 20:28:08 +0000 (Mon, 09 Apr 2007) | 11 lines

Move the function that pushes the compiled VCL programs C source through
the systems cc(1) from the VCL compiler library to the varnishd process.

This reduces the VCL-compiler library to a text-procesing functionality
and makes it easier to build other tools, including test-suites,
around the VCL-compiler.

It also moves the actual compiler invocation string into the varnishd
sources, where it can be handled appropriately, possibly as a paramter.


------------------------------------------------------------------------
r1307 | phk | 2007-04-09 20:30:05 +0000 (Mon, 09 Apr 2007) | 2 lines

<queue.h> is a local #include in varnish, so use "queue.h"

------------------------------------------------------------------------
r1308 | phk | 2007-04-09 20:34:14 +0000 (Mon, 09 Apr 2007) | 2 lines

Two missing NULL initializations.

------------------------------------------------------------------------
r1309 | phk | 2007-04-09 20:50:12 +0000 (Mon, 09 Apr 2007) | 4 lines

Add a -C argument, which compiles the VCL (either default with -b
or user specified with -f) and outputs the C source on the stdout.


------------------------------------------------------------------------
r1310 | phk | 2007-04-09 21:03:12 +0000 (Mon, 09 Apr 2007) | 2 lines

Fix stylistic Flexelint unhappiness with the compiled C source.

------------------------------------------------------------------------
r1311 | phk | 2007-04-09 21:08:21 +0000 (Mon, 09 Apr 2007) | 2 lines

Add scripts to run flexelint over VCL compiler output

------------------------------------------------------------------------
r1312 | phk | 2007-04-11 09:09:00 +0000 (Wed, 11 Apr 2007) | 2 lines

Remember to initialize C_flag and don't exit in far away code.

------------------------------------------------------------------------
r1313 | phk | 2007-04-11 09:16:13 +0000 (Wed, 11 Apr 2007) | 2 lines

Need to find other way to shut up flexelint.

------------------------------------------------------------------------
r1314 | phk | 2007-04-19 09:34:45 +0000 (Thu, 19 Apr 2007) | 3 lines

Standards compliance: fputs(3) returns non-negative on success.


------------------------------------------------------------------------
r1315 | phk | 2007-04-19 10:00:37 +0000 (Thu, 19 Apr 2007) | 2 lines

Emit acl matching code to the function body.

------------------------------------------------------------------------
r1359 | phk | 2007-04-19 15:17:35 +0000 (Thu, 19 Apr 2007) | 9 lines

When we have some amount of a chunk header, but not all of it, we
need to read more from the fd. The semantics we _really_ want for
that read operation is "wait until at least one char is available,
then return as many as N to us".

This can be done with a combination of system calls, but it is likely
just as cheap to just read one char at a time, so we do that.


------------------------------------------------------------------------
r1360 | des | 2007-04-21 17:48:21 +0000 (Sat, 21 Apr 2007) | 2 lines

Clarify synopsis / description

------------------------------------------------------------------------
r1361 | des | 2007-04-21 17:52:44 +0000 (Sat, 21 Apr 2007) | 2 lines

Style and whitespace cleanup + clarify comment explaining the log format

------------------------------------------------------------------------
r1362 | des | 2007-04-21 21:48:56 +0000 (Sat, 21 Apr 2007) | 12 lines

Major rewrite of the VSL handler for increased robustness and clarity:

- Treat all request fields in a similar manner.

- Mostly eliminate fixed-size buffers.

- Don't print or format anything until we see ReqEnd.

- If we saw a Host: header, use it to generate an absolute URI,
resulting in far more useful output when processing logs from a
server which handles multiple virtual hosts.

------------------------------------------------------------------------
r1363 | des | 2007-04-22 13:09:59 +0000 (Sun, 22 Apr 2007) | 2 lines

Further eliminate fixed-size buffers.

------------------------------------------------------------------------
r1364 | des | 2007-04-24 09:39:12 +0000 (Tue, 24 Apr 2007) | 6 lines

Correctly detect the presence and location of all external library we use
(except for the C math library, which the C standard guarantees is always
available as -lm) and more importantly, use them only where needed.

This should fix the compilation issues on SuSE.

------------------------------------------------------------------------
r1365 | des | 2007-04-24 12:23:37 +0000 (Tue, 24 Apr 2007) | 3 lines

Move CFLAGS configuration to the bottom so it doesn't affect other tests.
This makes --enable-werror work again.

------------------------------------------------------------------------
r1366 | des | 2007-04-24 12:36:58 +0000 (Tue, 24 Apr 2007) | 3 lines

Move CFLAGS configuration to the bottom so it doesn't affect other tests.
This makes --enable-werror work again.

------------------------------------------------------------------------
r1367 | des | 2007-04-24 12:37:58 +0000 (Tue, 24 Apr 2007) | 2 lines

Eliminate warnings.

------------------------------------------------------------------------
r1368 | phk | 2007-04-26 06:54:58 +0000 (Thu, 26 Apr 2007) | 5 lines

Add compat trick for clock_gettime()

Submitted by: Pierre Queinnec <pierre.queinnec@zenika.com>


------------------------------------------------------------------------
r1369 | des | 2007-04-26 10:39:19 +0000 (Thu, 26 Apr 2007) | 2 lines

Force CONFIG_SHELL to /bin/sh.

------------------------------------------------------------------------
Planning for 1.0.4 [ In reply to ]
des@linpro.no (Dag-Erling Sm?rgrav) writes:
> There are a number of improvements in trunk (and branches/1.0) which I
> would like to release as 1.0.4.
>
> I am thinking primarily of trunk as of r1288 (or branches/1.0 as of
> r1331, no thanks to svk). However, I'd like to ask you if there are
> any newer changes you think should be included. I think r1364-r1369
> (autoconf cleanup + missing include) are good candidates. So are the
> varnishncsa changes I made last week, but they need a shakedown.

I've gone through the entire changelog since r1288, and have concluded
that I want all of it in 1.0.4. Apart from the addition of inline C
syntax to VCL and the ping_interval parameter, it's all bug fixes and
increased reliability / robustness.

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
Planning for 1.0.4 [ In reply to ]
des@linpro.no (Dag-Erling Sm?rgrav) writes:
> I've gone through the entire changelog since r1288, and have concluded
> that I want all of it in 1.0.4. Apart from the addition of inline C
> syntax to VCL and the ping_interval parameter, it's all bug fixes and
> increased reliability / robustness.

A little further down the road, there are additional bug fixes I want to
bring in: everything up to and including r1387, plus r1399. I'll merge
these to branches/1.0 as soon as I feel confident about svnmerge.

I am also working on a set of guidelines for packaging Varnish. I would
like Varnish to ship with the same default configuration on all OSes /
distributions, so we won't have to guess when a user comes to us with a
problem. I have created a Wiki page for these guidelines:

http://varnish.projects.linpro.no/wiki/OutOfTheBox

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
Planning for 1.0.4 [ In reply to ]
* Dag-Erling Sm?rgrav
> Other priorities for 1.0.4: unify init scripts and out-of-the-box
> configurations across distributions

I think a unified init script will be very difficult to achieve if one
wants to keep the package included in mainstream Linux distributions
like Fedora/RedHat, SuSE or Debian. They have explicit rules on what an
init script should look like, and they are by no means compatible,
leaning on style, tools and macros that are very distribution specific.

A common configuration file, stored in /etc/sysconfig/varnish (RedHat,
SuSE) or /etc/defaults/varnish (Debian) would do nicely. The existing
Debian and Fedora versions are not too different.

> (...) include an init script for varnishlog

RedHat/Fedora allows several daemons started from a single init script.
Consider RedHat's syslog script, that starts both syslogd and klogd.

Ingvar

--
Planning for 1.0.4 [ In reply to ]
Ingvar Hagelund <ingvar@linpro.no> writes:
> * Dag-Erling Sm?rgrav
> > Other priorities for 1.0.4: unify init scripts and out-of-the-box
> > configurations across distributions
> I think a unified init script will be very difficult to achieve if one
> wants to keep the package included in mainstream Linux distributions
> like Fedora/RedHat, SuSE or Debian. They have explicit rules on what
> an init script should look like, and they are by no means compatible,
> leaning on style, tools and macros that are very distribution
> specific.

I'm not after "a single unified init script", but "appropriate init
scripts for each distribution which behave in as similar a manner as
possible".

> > (...) include an init script for varnishlog
> RedHat/Fedora allows several daemons started from a single init script.
> Consider RedHat's syslog script, that starts both syslogd and klogd.

What if the admin wants to stop varnishlog (which can produce enormous
amounts of data on high-traffic sites), or changes the varnishlog
configuration and wants to restart just varnishlog but not varnishd?

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
Planning for 1.0.4 [ In reply to ]
* Dag-Erling Sm?rgrav
>>> Other priorities for 1.0.4: unify init scripts and out-of-the-box
>>> configurations across distributions (...)

> I'm not after "a single unified init script", but "appropriate init
> scripts for each distribution which behave in as similar a manner as
> possible".

I've put my latest initrc and sysconfig scripts at
http://users.linpro.no/ingvar/varnish/fedora-extras-commit/. Lars and
Stig, could you comment on them, please.

Also, consider to glance over the Fedora review request at
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230275

> (...) What if the admin wants to stop varnishlog (which can produce enormous
> amounts of data on high-traffic sites), or changes the varnishlog
> configuration and wants to restart just varnishlog but not varnishd?

Reasonable. One might also consider not running varnishlog at all. Two
scripts it is, then.

Ingvar

--
N?r alt annet feiler: Symlink
Planning for 1.0.4 [ In reply to ]
Ingvar Hagelund <ingvar@linpro.no> writes:
> I've put my latest initrc and sysconfig scripts at
> http://users.linpro.no/ingvar/varnish/fedora-extras-commit/. Lars and
> Stig, could you comment on them, please.

These can be used unmodified for RedHat, Fedora and CentOS, right?

Could you update the contents of the redhat directory in trunk?

> Also, consider to glance over the Fedora review request at
> http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230275

One thing I noticed was the mention of iconv - the man pages should
already be in UTF-8; if they aren't, let me know and I'll fix them.

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
Planning for 1.0.4 [ In reply to ]
* Ingvar Hagelund
> > I've put my latest initrc and sysconfig scripts at
> > http://users.linpro.no/ingvar/varnish/fedora-extras-commit/. Lars and
> > Stig, could you comment on them, please.

* Dag-Erling Sm?rgrav
> These can be used unmodified for RedHat, Fedora and CentOS, right?

The binary packages will probably work if the target cpu matches, yes,
though I prefer to recompile the source package specifically for the
target system. The source package should produce packages for any
RedHat-based system running the 2.6 kernel.

> Could you update the contents of the redhat directory in trunk?

Will do.

> > Also, consider to glance over the Fedora review request at
> > http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230275
>
> One thing I noticed was the mention of iconv - the man pages should
> already be in UTF-8; if they aren't, let me know and I'll fix them.

They are not, at least not in the 1.0.3 tarball.

Ingvar

--
Planning for 1.0.4 [ In reply to ]
Ingvar Hagelund <ingvar@linpro.no> writes:
> * Dag-Erling Sm?rgrav
> > These can be used unmodified for RedHat, Fedora and CentOS, right?
> The binary packages will probably work if the target cpu matches, yes,
> though I prefer to recompile the source package specifically for the
> target system. The source package should produce packages for any
> RedHat-based system running the 2.6 kernel.

What I meant was that the same spec file can be used for each of the
aforementioned distributions.

> > Could you update the contents of the redhat directory in trunk?
> Will do.

In *trunk*, please.

> > One thing I noticed was the mention of iconv - the man pages should
> > already be in UTF-8; if they aren't, let me know and I'll fix them.
> They are not, at least not in the 1.0.3 tarball.

OK, I'll take care of it.

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
Planning for 1.0.4 [ In reply to ]
* Dag-Erling Sm?rgrav
>>> These can be used unmodified for RedHat, Fedora and CentOS, right?
> What I meant was that the same spec file can be used for each of the
> aforementioned distributions.

Untestet on rhel5/centos5, but yes.

>>> Could you update the contents of the redhat directory in trunk?
> In *trunk*, please.

Yeah, yeah, I'm coming there real soon now. Wanted to test some changes
in the 1.0 branch first.

I have used '-D' for daemonize and '-p' for pidfile in the initscript
for the upcoming daemonizing feature of varnishlog. Will '-p' take an
argument (the path to the pidfile)?

Ingvar

--
N?r alt annet feiler: Symlink
Planning for 1.0.4 [ In reply to ]
Ingvar Hagelund <ingvar@linpro.no> writes:
> I have used '-D' for daemonize and '-p' for pidfile in the initscript
> for the upcoming daemonizing feature of varnishlog. Will '-p' take an
> argument (the path to the pidfile)?

The correct option is -P (-p is already taken in varnishd) and yes, it
will take an argument.

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
Planning for 1.0.4 [ In reply to ]
* Dag-Erling Sm?rgrav
>>> Could you update the contents of the redhat directory in trunk?

Done. Seems to build and work from today's svn:

[ingvar@uname ~/svn/varnish/trunk]$ cat buildrpm.sh
#!/bin/bash
VERSION=$( awk ' /^Version:/ { print $2 } '
varnish-cache/redhat/varnish.spec )
ln -s varnish-cache varnish-$VERSION
tar $(
find varnish-$VERSION/ -type d -name .svn | \
while read i; do
echo -n "--exclude $i "
done
) -cvzf varnish-$VERSION.tar.gz varnish-$VERSION/*
rm varnish-$VERSION
rpmbuild -tb varnish-$VERSION.tar.gz

[ingvar@uname ~/svn/varnish/trunk]$ sh buildrpm.sh
(...)
Wrote: ~/rpm/RPMS/x86_64/varnish-1.0.svn-20070511.x86_64.rpm
Wrote: ~/rpm/RPMS/x86_64/varnish-libs-1.0.svn-20070511.x86_64.rpm
Wrote: ~/rpm/RPMS/x86_64/varnish-debuginfo-1.0.svn-20070511.x86_64.rpm
(...)
+ exit 0

$ rpmlint ~/rpm/RPMS/x86_64/*20070511*rpm | wc -l
0

[ingvar@uname ~]$ cat /etc/redhat-release; uname -a
Red Hat Enterprise Linux ES release 4 (Nahant Update 5)
Linux uname 2.6.9-42.0.3.EL #1 Mon Sep 25 17:14:08 EDT 2006 x86_64
x86_64 x86_64 GNU/Linux

[ingvar@uname ~]$ sudo rpm -i ~/rpm/RPMS/x86_64/*20070511*rpm
[ingvar@uname ~]$ sudo /sbin/service varnish start
Starting varnish HTTP accelerator: [ OK ]

[ingvar@uname ~]$ time curl http://localhost:6081/index.html \
> /dev/null 2>&1
real 0m0.084s
user 0m0.006s
sys 0m0.006s

[ingvar@uname ~]$ time curl http://localhost:6081/index.html \
> /dev/null 2>&1
real 0m0.014s
user 0m0.005s
sys 0m0.006s

--
When everything else fail: Symlink
Planning for 1.0.4 [ In reply to ]
Ingvar Hagelund <ingvar@linpro.no> writes:
> * Dag-Erling Sm?rgrav
> > Could you update the contents of the redhat directory in trunk?
> Done. Seems to build and work from today's svn:

Great!

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no