[Varnish] #1298: varnishncsa startup script, Ubuntu package

Varnish varnish-bugs at varnish-cache.org
Mon May 6 08:09:44 CEST 2013


#1298: varnishncsa startup script, Ubuntu package
----------------------+-----------------------
 Reporter:  michaelt  |       Type:  defect
   Status:  new       |   Priority:  normal
Milestone:            |  Component:  packaging
  Version:  3.0.3     |   Severity:  normal
 Keywords:            |
----------------------+-----------------------
 Hi -

 When varnishncsa is not running, an improper exit code is returned when
 checking the status of varnishncsa.  Eg:

 {{{
 root at ubuntu:~# service varnishncsa status
  * varnishncsa is not running
 root at ubuntu:~# echo $?
 0
 }}}

 Compare with the varnish process:

 {{{
 root at ubuntu:~# service varnish status
  * varnishd is not running
 root at ubuntu:~# echo $?
 1
 }}}

 The exit code for varnishncsa should be non zero similar to the check for
 varnish.  Modifying with the following diff to
 '''/etc/init.d/varnishncsa''' addresses this issue.  This addition brings
 it inline with that found in the ''status_varnishd'' function of
 '''/etc/init.d/varnish'''

 {{{
 77d76
 <     exit $?
 }}}

 We are using SaltStack to manage our installation and configuration of
 applications, Varnish included.  Telling Salt to ensure varnishncsa was
 running did not work until the correct return code was provided when the
 status check was run.

 Although we don't use varnishlog, it appears that its init script has the
 same issue.

 Currently running
 * Version: 3.0.3-1~precise
 * Ubuntu Server 12.04 LTS
 * Uname: Linux ubuntu 3.2.0-40-generic #64-Ubuntu SMP Mon Mar 25 21:22:10
 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
 * Using the Varnish Ubuntu repository available at
 http://repo.varnish-cache.org/ubuntu/

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




More information about the varnish-bugs mailing list