[Varnish] #1343: Storage file handling fails if file exists

Varnish varnish-bugs at varnish-cache.org
Fri Sep 13 13:33:59 CEST 2013


#1343: Storage file handling fails if file exists
----------------------+-------------------
 Reporter:  lkarsten  |      Owner:
     Type:  defect    |     Status:  new
 Priority:  normal    |  Milestone:
Component:  varnishd  |    Version:  trunk
 Severity:  minor     |   Keywords:
----------------------+-------------------
 When starting Varnish with -sfile,/tmp/file,SIZE , and the SIZE has
 changed since last run, the error message output when the file exists is
 confusing.

 Expected result (for me): File is truncated to new size, Varnishd starts
 as usual.

 {{{
 root at fryer1:~# /opt/varnish/sbin/varnishd -T localhost:6082 -a :6081 -f
 /opt/varnish/etc/testsuite.vcl -s file,/tmp/frosk,350G -d
 Platform: Linux,3.2.0-51-generic,x86_64,-sfile,-smalloc,-hcritbit
 200 273
 -----------------------------
 Varnish Cache CLI 1.0
 -----------------------------
 Linux,3.2.0-51-generic,x86_64,-sfile,-smalloc,-hcritbit
 varnish-trunk revision 09548e6

 Type 'help' for command list.
 Type 'quit' to close CLI session.
 Type 'start' to launch worker process.

 quit
 500 22
 Closing CLI connection
 root at fryer1:~# ls -l /tmp
 total 46128
 drwx------ 2 root root         4096 Sep  9 14:17 aheaQ147
 drwx------ 2 root root         4096 Sep  9 15:24 am4tAtn17I
 drwx------ 2 root root         4096 Sep  9 14:17 am4tWn0ufF
 -rw------- 1 root root 375809638400 Sep 13 13:28 frosk
 [..]

 root at fryer1:~# /opt/varnish/sbin/varnishd -T localhost:6082 -a :6081 -f
 /opt/varnish/etc/testsuite.vcl -s file,/tmp/frosk,10G -d
 WARNING: (-sfile) file size reduced to 344769626112 (80% of available disk
 space)
 Platform: Linux,3.2.0-51-generic,x86_64,-sfile,-smalloc,-hcritbit
 200 273
 -----------------------------
 Varnish Cache CLI 1.0
 -----------------------------
 Linux,3.2.0-51-generic,x86_64,-sfile,-smalloc,-hcritbit
 varnish-trunk revision 09548e6

 Type 'help' for command list.
 Type 'quit' to close CLI session.
 Type 'start' to launch worker process.

 quit
 500 22
 Closing CLI connection
 root at fryer1:~#
 root at fryer1:~# ls -l /tmp/frosk
 -rw------- 1 root root 344769626112 Sep 13 13:28 /tmp/frosk
 }}}

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




More information about the varnish-bugs mailing list