Hi Dridi,

Thanks! Knowing what to look for, I found the relevant commit at

  http://www.gossamer-threads.com/lists/varnish/commits/29579

Useful to add to docs, too!

Once that's fixed (no more error), I get the NEXT error, Maybe related?

According to

        "req.backend.healthy replaced by std.healthy(req.backend)"

I changed in my vcl

                ...
        -           if (req.backend.healthy) {
223     +           if (std.healthy(req.backend)) {
                        set req.grace = 30s;
                    } else {
                        set req.grace = 1h;
                    }  
                ...


but config check reports

        Message from VCC-compiler:
        Symbol not found: 'std.healthy' (expected type BOOL):
        ('input' Line 223 Pos 13)
                if (std.healthy(req.backend)) {
        ------------###########----------------

        Running VCC-compiler failed, exit 1

        VCL compilation failed

Looking in the examples, too ...

Grant


On Sun, May 4, 2014, at 09:22 AM, Dridi Boukelmoune wrote:
> On Sun, May 4, 2014 at 6:04 PM,  <[email protected]> wrote:
> > Hi,
> >
> > I've upgraded from Varnish 3 -> 4, and am working on converting my VCL,
> > following
> >
> >         "Upgrading to Varnish 4"
> >          https://www.varnish-cache.org/docs/trunk/whats-new/upgrading.html
> >
> > After making changes as I've understood them, I thing I've gotten most
> > right, but on config file check, I still get a fail,
> >
> >         varnishd -C -f vcl.SITE.conf
> >         Message from VCC-compiler:
> >         Unknown variable 'req.backend'
> >         At: ('input' Line 94 Pos 81)
> >                         if     (req.url ~
> >                         "\.(css|css?.*|woff|eot|svg|ttf|otf)$") { set
> >                         req.backend = css_SITE1; }
> >         
> > --------------------------------------------------------------------------------###########-------------------------
> >
> >         Running VCC-compiler failed, exit 1
> >
> >         VCL compilation failed
> >
> >
> > I've likely missed/misunderstood a required change :-/
> >
> > Here's the relevant snip from my config
> >
> >                 ...
> >
> >             backend def_SITE1 { .port = "10100"; include
> >             "/usr/local/etc/varnish/backend_common.vcl"; }
> >             backend css_SITE1 { .port = "10101"; include
> >             "/usr/local/etc/varnish/backend_common.vcl"; }
> >             backend  js_SITE1 { .port = "10102"; include
> >             "/usr/local/etc/varnish/backend_common.vcl"; }
> >             backend img_SITE1 { .port = "10103"; include
> >             "/usr/local/etc/varnish/backend_common.vcl"; }
> >
> >             backend def_FALLBACK   { .port = "9999"; include
> >             "/usr/local/etc/varnish/backend_common.vcl"; }
> >
> >         sub hostname_normalize {
> >             if (req.http.host == "www.mydomain.net"  )              {
> >             set req.http.host =   "mydomain.net"; }
> >
> >         sub backend_assign {
> >             if (req.http.host == "mydomain.net" ) {
> > 94              if     (req.url ~
> > "\.(css|css?.*|woff|eot|svg|ttf|otf)$") { set req.backend = css_SITE1; }
> >                 elseif (req.url ~ "\.(js|js?.*)$"
> >                 ) { set req.backend =  js_SITE1; }
> >                 elseif (req.url ~ "\.(jp(e?)g|gif|png|ti(f?)f)$"
> >                 ) { set req.backend = img_SITE1; }
> >                 else
> >                  { set req.backend = def_SITE1; }
> >             }
> >
> >         ...
> >
> > What's "req.backend" need to be changed to?
> 
> Hi,
> 
> You need to change it to backend_hint.
> 
> It is not clearly documented in the "upgrading" page but you can see
> it on the directors examples.
> 
> Cheers,
> Dridi
> 
> > Grant
> >
> > _______________________________________________
> > varnish-misc mailing list
> > [email protected]
> > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to