Mailing List Archive

#1760: varnishstat -w dies if varnish is restarted.
#1760: varnishstat -w dies if varnish is restarted.
-------------------------+-------------------
Reporter: lkarsten | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishstat | Version: trunk
Severity: normal | Keywords:
-------------------------+-------------------
The -w (wait) functionality in varnishstat is there to write a continuous
feed of varnishstat counters to stdout.

If varnishd is restarted there is very little error handling in
varnishstat, just an exit(1). It is usually in these conditions the
numbers output by varnishstat is the most useful.

Expected: varnishstat gracefully handled that varnish went away and came
back.

After discussing this with Martin for a bit, I think we should either:
1) Fix varnishstat to be a proper daemon (write to a logfile by itself,
handle SIGHUP, example init script to start/stop collection), or
2) remove -w and say that anyone needing this can use a shell loop
instead.

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

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1760: varnishstat -w dies if varnish is restarted. [ In reply to ]
#1760: varnishstat -w dies if varnish is restarted.
-------------------------+--------------------
Reporter: lkarsten | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishstat | Version: trunk
Severity: normal | Resolution:
Keywords: |
-------------------------+--------------------

Comment (by fgsch):

My personal preference is # 2.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1760#comment:1>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1760: varnishstat -w dies if varnish is restarted. [ In reply to ]
#1760: varnishstat -w dies if varnish is restarted.
-------------------------+--------------------
Reporter: lkarsten | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishstat | Version: trunk
Severity: normal | Resolution:
Keywords: |
-------------------------+--------------------

Comment (by martin):

#2 decided in bugwash

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1760#comment:2>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1760: varnishstat -w dies if varnish is restarted. [ In reply to ]
#1760: varnishstat -w dies if varnish is restarted.
-------------------------+--------------------
Reporter: lkarsten | Owner: dridi
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishstat | Version: trunk
Severity: normal | Resolution:
Keywords: |
-------------------------+--------------------
Changes (by lkarsten):

* owner: => dridi


Comment:

Dridi will take a look in August.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1760#comment:3>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1760: varnishstat -w dies if varnish is restarted. [ In reply to ]
#1760: varnishstat -w dies if varnish is restarted.
-------------------------+--------------------
Reporter: lkarsten | Owner: dridi
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishstat | Version: trunk
Severity: normal | Resolution:
Keywords: |
-------------------------+--------------------

Comment (by Dridi):

Lasse, can you please take care of removing -w in 4.1?

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1760#comment:4>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1760: varnishstat -w dies if varnish is restarted. [ In reply to ]
#1760: varnishstat -w dies if varnish is restarted.
-------------------------+--------------------
Reporter: lkarsten | Owner: dridi
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishstat | Version: trunk
Severity: normal | Resolution:
Keywords: |
-------------------------+--------------------

Comment (by fgsch):

While looking at diff I realised that -w also specified the refresh
interval for the curses interface.

Is defaulting to 1 second good enough or we should have some way to change
this?

I'm starting to think we should handle case 1 without becoming a daemon
(i.e. varnishstat keeps retrying until varnishd is back).

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1760#comment:5>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1760: varnishstat -w dies if varnish is restarted. [ In reply to ]
#1760: varnishstat -w dies if varnish is restarted.
-------------------------+--------------------
Reporter: lkarsten | Owner: dridi
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishstat | Version: trunk
Severity: normal | Resolution:
Keywords: |
-------------------------+--------------------

Comment (by Dridi):

I didn't mention it but I'm in favor of solution 1, with a rename of -w to
something else like -W (wait) or -i (interval) so that -w could be reused
and have the same meaning as in other tools.

Either way, wrapper script or proper daemon, I need -w to go away in 4.1
to re-introduce it later regardless of the chosen solution.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1760#comment:6>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1760: varnishstat -w dies if varnish is restarted. [ In reply to ]
#1760: varnishstat -w dies if varnish is restarted.
-------------------------+---------------------
Reporter: lkarsten | Owner: dridi
Type: defect | Status: closed
Priority: normal | Milestone:
Component: varnishstat | Version: trunk
Severity: normal | Resolution: fixed
Keywords: |
-------------------------+---------------------
Changes (by Federico G. Schwindt <fgsch@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [561b56cececb80337df10b9d1ec2daebd7d28333]:
{{{
#!CommitTicketReference repository=""
revision="561b56cececb80337df10b9d1ec2daebd7d28333"
Remove -w option from varnishstat

For continuous updates we can always use a shell loop.

Fixes #1760.
}}}

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1760#comment:7>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs