Mailing List Archive

Problems with varnish 1.1 and obj.status
Hi,

I've just uppgraded to varnish 1.1

The upgrade worked just fine and varnish started with my old vcl-file without problems.

However when I added the following to sub vcl_fetch {}

if (obj.status == 404) {
pass;
} else {
set obj.ttl = 900s;
insert;
}

Varnish fails at restart with the following response:

Starting varnishd.
Problem loading compiled VCL program:
./bin.U5BscB9E: Undefined symbol "VRT_r_obj_status"

If I remove the "if (obj.status == 404)" statement everything works just fine.

--
Thomas Westlund
Problems with varnish 1.1 and obj.status [ In reply to ]
Thomas Westlund <thomas.westlund at aftenposten.no> writes:
> Varnish fails at restart with the following response:
>
> Starting varnishd.
> Problem loading compiled VCL program:
> ./bin.U5BscB9E: Undefined symbol "VRT_r_obj_status"
>
> If I remove the "if (obj.status == 404)" statement everything works just fine.

Looks like an oversight; resp.status is both readable and writable, but
obj.status is write-only.

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
Problems with varnish 1.1 and obj.status [ In reply to ]
Dag-Erling Sm?rgrav <des at linpro.no> writes:
> Looks like an oversight; resp.status is both readable and writable, but
> obj.status is write-only.

Try the attached patch.

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: VRT_r_obj_status.diff
Type: text/x-diff
Size: 501 bytes
Desc: not available
Url : http://projects.linpro.no/pipermail/varnish-misc/attachments/20070724/de077354/attachment.diff
Problems with varnish 1.1 and obj.status [ In reply to ]
Hi,


On Tue, Jul 24, 2007 at 10:42:34AM +0200, Dag-Erling Sm?rgrav wrote:
> Dag-Erling Sm?rgrav <des at linpro.no> writes:
> > Looks like an oversight; resp.status is both readable and writable, but
> > obj.status is write-only.
>
> Try the attached patch.

The patch works, I'm now able to control the caching of 404's.

Thank you very much for the help.


--

Thomas Westlund
Aftenposten AS, UNIX/nettverksavd.
Postboks 1, 0051 Oslo
Tlf: +47 98 20 30 33
Fax: +47 22 86 40 74