Re: [Bug 1284095] [NEW] add configtest action to init.d script

2014-03-03 Thread Stig Sandbeck Mathisen
Samuele Giovanni Tonon 1284...@bugs.launchpad.net writes:

 i think they are two totally different scenarios.

 i'd use -C or configtest just as a syntax check, the same way
 apachectl configtest or nginx -t -c /etc/nginx/nginx.conf .

Actually, good point.

I've been using varnishadm vcl.load instead of -C. It does check the
config, but I guess that only works if you have a running varnish.

-- 
Stig Sandbeck Mathisen

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1284095

Title:
  add configtest action to init.d script

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/varnish/+bug/1284095/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 1284095] [NEW] add configtest action to init.d script

2014-03-02 Thread Stig Sandbeck Mathisen
On Mon, Feb 24, 2014 at 01:02:41PM -, Samuele Giovanni Tonon wrote:
 Public bug reported:
 
 hello, it would be awesome to have a configtest action in the init.d
 script , in this way you can safely test a vcl configuration by just
 doing
 
 /etc/init.d/varnish configtest

Thank you.

Automatic testing of the configuration with this before starting the
service is a very good feature.  I'm less convinced it should replace
varnishadm for interactive use, though.

-- 
Stig

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1284095

Title:
  add configtest action to init.d script

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/varnish/+bug/1284095/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 1284095] [NEW] add configtest action to init.d script

2014-03-02 Thread Samuele Giovanni Tonon
On 03/02/2014 04:34 PM, Stig Sandbeck Mathisen wrote:
 On Mon, Feb 24, 2014 at 01:02:41PM -, Samuele Giovanni Tonon wrote:
 Public bug reported:

 hello, it would be awesome to have a configtest action in the init.d
 script , in this way you can safely test a vcl configuration by just
 doing

 /etc/init.d/varnish configtest

 Thank you.

 Automatic testing of the configuration with this before starting the
 service is a very good feature.  I'm less convinced it should replace
 varnishadm for interactive use, though.

i think they are two totally different scenarios.

i'd use  -C or configtest just as a syntax check, the same way
apachectl configtest or nginx -t -c /etc/nginx/nginx.conf .

varnishadm is for a hot swap of the conf without having to restart
and loose my cache. i'd use varnishadm *AFTER*  configtest

Cheers
Samuele

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1284095

Title:
  add configtest action to init.d script

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/varnish/+bug/1284095/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1284095] [NEW] add configtest action to init.d script

2014-02-24 Thread Samuele Giovanni Tonon
Public bug reported:

hello,
it would be awesome to have a configtest action in the init.d script ,
in this way you can safely test a vcl configuration by just doing

/etc/init.d/varnish configtest


this can be done by applying this simple patch to /etc/init.d/varnish
--- /etc/init.d/varnish.old 2013-06-29 16:21:10.0 +0200
+++ /etc/init.d/varnish 2014-02-24 14:00:34.342417000 +0100
@@ -89,6 +89,10 @@
 exit $?
 }
 
+configtest() {
+$DAEMON ${DAEMON_OPTS} -C -n /tmp  /dev/null  echo Syntax ok
+}
+
 case $1 in
 start)
 case ${START:-} in
@@ -113,8 +117,11 @@
 $0 stop
 $0 start
 ;;
+configtest)
+   configtest
+   ;;
 *)
-log_success_msg Usage: $0 {start|stop|restart|reload|force-reload}
+log_success_msg Usage: $0 
{start|stop|restart|reload|force-reload|configtest}
 exit 1
 ;;
 esac


Cheers
Samuele

** Affects: varnish (Ubuntu)
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1284095

Title:
  add configtest action to init.d script

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/varnish/+bug/1284095/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs