Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 807544 - www-servers/varnish-6.3.2 www-servers/varnish-6.5.1 checkconfig not working with vcl 4.1 and named storage
Summary: www-servers/varnish-6.3.2 www-servers/varnish-6.5.1 checkconfig not working w...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-10 09:09 UTC by marco
Modified: 2023-01-28 20:08 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description marco 2021-08-10 09:09:38 UTC
checkconfig function row

${VARNISHD} -C -f ${CONFIGFILE} >/dev/null 2>&1

inside /etc/init.d/varnishd is not working properly with vcl 4.1 and named storage.



Reproducible: Always

Steps to Reproduce:
Config Varnish with a named storage mytest
/etc/conf.d/varnishd:
..
VARNISHD_OPTS="-a 127.0.0.1:8080 -s mytest=file,/var/lib/varnish/mytest,200M"
..

###Works with vcl 4.0
cat >example.vcl-4.0 <<EOF
vcl 4.0;

# Default backend definition. Set this to point to your content server.
backend default {
    .host = "127.0.0.1";
    .port = "8080";
}

sub vcl_backend_response {
    set beresp.storage_hint = "mytest";
}
EOF

#check configuration ok 
varnishd -C -f example.vcl-4.0


###Do not works with vcl 4.1
cat >example.vcl-4.1 <<EOF
vcl 4.1;

# Default backend definition. Set this to point to your content server.
backend default {
    .host = "127.0.0.1";
    .port = "8080";
}

sub vcl_backend_response {
    set beresp.storage = storage.mytest;
}
EOF

#check configuration failed
varnishd -C -f example.vcl-4.1

Message from VCC-compiler:
Symbol not found: 'storage.mytest'
At: ('/etc/varnish/example.vcl-4.1' Line 10 Pos 26) -- (Pos 39)
    set beresp.storage = storage.mytest;
-------------------------##############-

Running VCC-compiler failed, exited with 2
VCL compilation failed





A checkconfig variant can be:
#set VARNISHD_STORAGE_OPTS inside /etc/conf.d/varnishd
VARNISHD_STORAGE_OPTS="-s mytest=file,/var/lib/varnish/mytest,200M"
VARNISHD_OPTS="-a 127.0.0.1:8080 $VARNISHD_STORAGE_OPTS"

and change into checkconfig
${VARNISHD} -C -f ${CONFIGFILE} >/dev/null 2>&1

with

${VARNISHD} ${VARNISHD_STORAGE_OPTS} -C -f ${CONFIGFILE} >/dev/null 2>&1
Comment 1 Anthony Basile gentoo-dev 2022-07-22 15:54:09 UTC
Can you test 7.1.0 because we're moving towards that next.  I will be dropping the 6.X altogether.