Skip to content
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

ban lurker skips objects #3007

Closed
nigoroll opened this issue May 29, 2019 · 0 comments
Closed

ban lurker skips objects #3007

nigoroll opened this issue May 29, 2019 · 0 comments

Comments

@nigoroll
Copy link
Member

pro-forma bug for fix ready to go in:

93d8050 made execution of ban_lurker_test_ban() conditional on bd != b, which effectively caused objects hanging off bans below request bans to not get tested against relevant bans.

Because object bans (from the obans list) are being marked completed, the objects which were skipped would also be missed to get evaluated against the relevant bans at lookup time unless they were evaluated in request context. So, in effect, we would simply miss to test bans.

Demo:

slink@haggis:~/Devel/varnish-git/varnish-cache ((126203852...))$ varnishd -a 127.0.0.1:8080 -f /tmp/t.vcl 
Debug: Version: varnish-trunk revision 1262038523db35653e97977fc874fbf8ae92b41b
Debug: Platform: Linux,4.9.0-9-amd64,x86_64,-jnone,-sdefault,-sdefault,-hcritbit
Debug: Child (29983) Started
slink@haggis:~/Devel/varnish-git/varnish-cache ((126203852...))$ n=0
slink@haggis:~/Devel/varnish-git/varnish-cache ((126203852...))$ curl -sI localhost:8080/n$n >/dev/null ; varnishadm ban obj.http.c1 == n$((n++)) ; varnishadm ban.list

Present bans:
1559149084.719650     0 -  obj.http.c1 == n0
1559149065.981858     1 C  

slink@haggis:~/Devel/varnish-git/varnish-cache ((126203852...))$ curl -sI localhost:8080/n$n >/dev/null ; varnishadm ban req.http.c1 == n$((n++)) ; varnishadm ban.list

Present bans:
1559149101.770700     0 -  req.http.c1 == n1
1559149084.719650     1 -  obj.http.c1 == n0
1559149065.981858     1 C  

slink@haggis:~/Devel/varnish-git/varnish-cache ((126203852...))$ curl -sI localhost:8080/n$n >/dev/null ; varnishadm ban req.http.c1 == n$((n++)) ; varnishadm ban.list

Present bans:
1559149105.659101     0 -  req.http.c1 == n2
1559149101.770700     1 -  req.http.c1 == n1
1559149084.719650     1 -  obj.http.c1 == n0
1559149065.981858     1 C  

slink@haggis:~/Devel/varnish-git/varnish-cache ((126203852...))$ varnishadm ban obj.status != 0

slink@haggis:~/Devel/varnish-git/varnish-cache ((126203852...))$ varnishadm ban.list
Present bans:
1559149116.432023     0 -  obj.status != 0
1559149105.659101     0 -  req.http.c1 == n2
1559149101.770700     1 -  req.http.c1 == n1
1559149084.719650     1 -  obj.http.c1 == n0
1559149065.981858     1 C  

slink@haggis:~/Devel/varnish-git/varnish-cache ((126203852...))$ varnishadm param.set ban_lurker_age 0.1

slink@haggis:~/Devel/varnish-git/varnish-cache ((126203852...))$ varnishadm ban.list
Present bans:
1559149116.432023     0 -  obj.status != 0
1559149105.659101     0 -  req.http.c1 == n2
1559149101.770700     1 -  req.http.c1 == n1
1559149084.719650     2 C  

@nigoroll nigoroll changed the title ban lurker misses bans ban lurker skips objects May 29, 2019
rezan pushed a commit to rezan/varnish-cache that referenced this issue Jul 11, 2019
93d8050 made execution of
ban_lurker_test_ban() conditional on bd != b, which effectively caused
objects hanging off bans below request bans to not get tested against
relevant bans.

Because object bans (from the obans list) are being marked completed,
the objects which were skipped would also be missed to get evaluated
against the relevant bans at lookup time unless they were evaluated in
request context. So, in effect, we would simply miss to test bans.

Fixes varnishcache#3007

Maybe related to varnishcache#3006
nigoroll added a commit to nigoroll/varnish-cache that referenced this issue Oct 2, 2019
93d8050 made execution of
ban_lurker_test_ban() conditional on bd != b, which effectively caused
objects hanging off bans below request bans to not get tested against
relevant bans.

Because object bans (from the obans list) are being marked completed,
the objects which were skipped would also be missed to get evaluated
against the relevant bans at lookup time unless they were evaluated in
request context. So, in effect, we would simply miss to test bans.

Fixes varnishcache#3007

Maybe related to varnishcache#3006
hermunn pushed a commit to hermunn/varnish-cache that referenced this issue Nov 3, 2020
93d8050 made execution of
ban_lurker_test_ban() conditional on bd != b, which effectively caused
objects hanging off bans below request bans to not get tested against
relevant bans.

Because object bans (from the obans list) are being marked completed,
the objects which were skipped would also be missed to get evaluated
against the relevant bans at lookup time unless they were evaluated in
request context. So, in effect, we would simply miss to test bans.

Fixes varnishcache#3007

Maybe related to varnishcache#3006
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant