New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

varnishstat -f field exclusion glob not working for varnish versions >= 4.0 #2320

Closed
zippolyte opened this Issue Apr 28, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@zippolyte

zippolyte commented Apr 28, 2017

Expected Behavior

With varnish-3.0.7 revision f544cd8 this is what I get and what I suppose is the expected behavior.
Without using exclusion glob:

$ varnishstat -1 -f SMA.*
SMA.s0.c_req                 0         0.00 Allocator requests
SMA.s0.c_fail                0         0.00 Allocator failures
SMA.s0.c_bytes               0         0.00 Bytes allocated
SMA.s0.c_freed               0         0.00 Bytes freed
SMA.s0.g_alloc               0          .   Allocations outstanding
SMA.s0.g_bytes               0          .   Bytes outstanding
SMA.s0.g_space       268435456          .   Bytes available
SMA.Transient.c_req            0         0.00 Allocator requests
SMA.Transient.c_fail           0         0.00 Allocator failures
SMA.Transient.c_bytes            0         0.00 Bytes allocated
SMA.Transient.c_freed            0         0.00 Bytes freed
SMA.Transient.g_alloc            0          .   Allocations outstanding
SMA.Transient.g_bytes            0          .   Bytes outstanding
SMA.Transient.g_space            0          .   Bytes available

Using exclusion glob:

$ varnishstat -1 -f SMA.* -f ^SMA.Transient.*
SMA.s0.c_req                 0         0.00 Allocator requests
SMA.s0.c_fail                0         0.00 Allocator failures
SMA.s0.c_bytes               0         0.00 Bytes allocated
SMA.s0.c_freed               0         0.00 Bytes freed
SMA.s0.g_alloc               0          .   Allocations outstanding
SMA.s0.g_bytes               0          .   Bytes outstanding
SMA.s0.g_space       268435456          .   Bytes available

Current Behavior

Starting with version 4.0, the exclusion field doesn't work anymore:

$ varnishstat -1 -f SMA.* -f ^SMA.Transient
SMA.s0.c_req                 0         0.00 Allocator requests
SMA.s0.c_fail                0         0.00 Allocator failures
SMA.s0.c_bytes               0         0.00 Bytes allocated
SMA.s0.c_freed               0         0.00 Bytes freed
SMA.s0.g_alloc               0          .   Allocations outstanding
SMA.s0.g_bytes               0          .   Bytes outstanding
SMA.s0.g_space       268435456          .   Bytes available
SMA.Transient.c_req            0         0.00 Allocator requests
SMA.Transient.c_fail            0         0.00 Allocator failures
SMA.Transient.c_bytes            0         0.00 Bytes allocated
SMA.Transient.c_freed            0         0.00 Bytes freed
SMA.Transient.g_alloc            0          .   Allocations outstanding
SMA.Transient.g_bytes            0          .   Bytes outstanding
SMA.Transient.g_space            0          .   Bytes available

I don't get any output if I use only an exclusion glob:

$ varnishstat -1 -f ^SMA.*
$

Steps to Reproduce (for bugs)

Try using an exclusion glob with the -f option of varnishstat with varnish >= 4.0

Your Environment

  • Versions used: varnishstat (varnish-4.0.0 revision 2acedeb) to varnishstat (varnish-5.1.2 revision 6ece695)
  • Operating System and version: Ubuntu 14.04

@fgsch fgsch self-assigned this Apr 28, 2017

@fgsch

This comment has been minimized.

Show comment
Hide comment
@fgsch

fgsch Apr 28, 2017

Member

Thanks for reporting it. I will take a look.

Member

fgsch commented Apr 28, 2017

Thanks for reporting it. I will take a look.

@fgsch fgsch closed this in d0b28d5 May 12, 2017

mbgrydeland added a commit that referenced this issue Jun 15, 2017

Rework -f option
We now process the inclusive globs first, and then the exclusive
ones.  The former are accumulative, while the latter will filter
the output from the first.

Discussed in detail with and final diff from @mbgrydeland.
Tests tweaking by yours truly.

Fixes #2320.

Conflicts:
	bin/varnishstat/varnishstat_options.h
	bin/varnishtest/tests/u00005.vtc
	lib/libvarnishapi/vsc.c

ibreger added a commit to thomsonreuters/varnish-cache that referenced this issue Jun 27, 2017

Rework -f option
We now process the inclusive globs first, and then the exclusive
ones.  The former are accumulative, while the latter will filter
the output from the first.

Discussed in detail with and final diff from @mbgrydeland.
Tests tweaking by yours truly.

Fixes #2320.

Conflicts:
	bin/varnishstat/varnishstat_options.h
	bin/varnishtest/tests/u00005.vtc
	lib/libvarnishapi/vsc.c

wmfgerrit pushed a commit to wikimedia/operations-debs-varnish4 that referenced this issue Jun 29, 2017

4.1.7-1wm1: new upstream, new counters
Package varnish 4.1.7, add counters for transient storage.

Introduce a new counter for shortlived objects creation,
cache_shortlived, and another one for uncacheable responses,
cache_uncacheable. They should provide insights when it comes to
monitoring transient storage usage.

Changes in 4.1.7:

 - Correctly honor nuke_limit parameter
   varnishcache/varnish-cache#1764
 - Prevent storage backends name collisions
   varnishcache/varnish-cache#2321
 - varnishstat -1 -f field inclusion glob doesn't allow VBE backend fields
   varnishcache/varnish-cache#2022
 - Health probes fail when HTTP response does not contain reason phrase
   varnishcache/varnish-cache#2069
 - "varnishstat -f MAIN.sess_conn -1" produces empty output
   varnishcache/varnish-cache#2118
 - Remember to reset workspace
   varnishcache/varnish-cache#2219
 - Rework and fix varnishstat counter filtering
   varnishcache/varnish-cache#2320
 - Docfix: Only root can jail
   varnishcache/varnish-cache#2329
 - Don't panic on a null ban
 - Add extra locking to protect the pools list and refcounts
 - Add -vsl_catchup to varnishtest
 - Add record-prefix support to varnishncsa

Bug: T164768
Ref: https://github.com/varnishcache/varnish-cache/blob/4.1/doc/changes.rst#varnish-cache-417-2017-06-28
Change-Id: I8a8f3a8103feb83b1a55a6788ea6c5d12963b4f5
@hermunn

This comment has been minimized.

Show comment
Hide comment
@hermunn

hermunn Sep 19, 2017

Contributor

Backport review: As you can see from the above, this was backported to 4.1 as 8482ced.

Contributor

hermunn commented Sep 19, 2017

Backport review: As you can see from the above, this was backported to 4.1 as 8482ced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment