[Pkg-varnish-devel] Bug#754967: Bug#754967: varnish: Varnish init.d script silently ignores failed reload-vcl

Paweł Sadowski pawel.sadowski at sadziu.pl
Thu Jul 17 22:02:07 UTC 2014


W dniu 17.07.2014 10:43, Stig Sandbeck Mathisen pisze:
> Control: tags -1 moreinfo
>
> Paweł Sadowski <debian.bugs at sadziu.pl> writes:
>
>> When trying to automate VCL deployment with Puppet I hit a bug in
>> Varnish init.d script. When called with 'reload' argument it always
>> returns 0, disregarding reload-vcl exit code due to 'exit 0' at the
>> end of this script.
>>
>> I can't think of any reason why this has been added there.
>>
>> 'exit 0' is present in 3.x and 4.x packages.
> I can't reproduce this on 4.0.1-1.
>
> Using "sh -x /usr/share/varnish/reload-vcl", I tested the following
> scenarios:
>
> - With varnish running, the return code is "0".
>
> - With varnish stopped, the return code is "1".
>
> - With a syntax error in the VCL, the return code is "1".
>
> - With an unprivileged user, the return code is "1".
>
> I need more information. Could you update the bug with the output of 
>
>   "sh -x /usr/share/varnish/reload-vcl ; echo $?"
>
> …when run as root?
>
It's not a problem with reload-vcl itself - problem exists in init.d script.
When you call:
  /etc/init.d/varnish reload
it should return error (if you put some garbage in vcl, just for test)
but instead returns 0 (due to 'exit 0' at the end).

-- 
PS



More information about the Pkg-varnish-devel mailing list