[Varnish] #1373: VCL includes with relative path names are always relative to /etc/varnish

Varnish varnish-bugs at varnish-cache.org
Tue Nov 12 15:33:51 CET 2013


#1373: VCL includes with relative path names are always relative to /etc/varnish
-----------------------+----------------------
 Reporter:  itamar_hc  |       Type:  defect
   Status:  new        |   Priority:  normal
Milestone:             |  Component:  varnishd
  Version:  3.0.2      |   Severity:  normal
 Keywords:             |
-----------------------+----------------------
 I am running varnishd with a config file I loaded from some random
 directory (I'm writing a functional test). It does an include. I would
 expect includes that are relative paths, e.g.:

 {{{
 include "something.vcl";
 }}}

 to be relative to the path of the VCL file with the include. In fact, they
 are always relative to /etc/varnish/.

 {{{
 $ cd /tmp
 $ touch something.vcl
 $ echo 'include "something.vcl";' > default.vcl
 $ varnishd -C -f default.vcl -n /tmp
 ...
 Cannot read file 'something.vcl': No such file or directory
 }}}

 If you use "strace -f" you will see:

 {{{
 [pid 13462] open("//etc/varnish/something.vcl", O_RDONLY) = -1 ENOENT (No
 such file or directory)
 }}}

-- 
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1373>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator




More information about the varnish-bugs mailing list