Hi Willy,
I thought lets give those reg-test another try :) as its easy to run and
dev3 just came out.
All tests pass on my FreeBSD system, except this one, new reg-test attached.
Pretty much the same test as previously send, but now with only 4 x 10
connections. Which should be fine for conntrack and sysctls (i hope..).
It seems those stats numbers are 'off', or is my expected value not as
fixed as i thought it would be?
Tested with:
HA-Proxy version 1.9-dev3-27010f0 2018/09/29
FreeBSD freebsd11 11.1-RELEASE
Results:
**** h1 0.0 CLI recv|CumConns: 33
**** h1 0.0 CLI recv|CumReq: 65
---- h1 0.0 CLI expect failed ~ "CumConns: 41"
If my 'expect' is correct, would the patch be suitable for inclusion
with the other reg-tests this way?
If you want to rename loadtest, to heavytest, or any other tweaks please
feel free to do so.
Regards,
PiBa-NL (Pieter)
Op 20-9-2018 om 22:25 schreef PiBa-NL:
Hi Willy,
Op 20-9-2018 om 13:56 schreef Willy Tarreau:
For me the test produces like 345 lines of output as attached. which seems
not to bad (if the test succeeds).
It's already far too much for a user.
Well those 345 lines are if it succeeds while in 'verbose' mode, in
'normal' mode it only produces 1 line of output when successful.
Pretty much all tests produce 100+ lines of 'logging' if they fail for
some reason. From what ive seen varnishtest either produces a bulk of
logging on a failure, or it only logs the failures. There isn't much
in between.
As for all the rest of the email, thanks for your elaborate response :).
Regards,
PiBa-NL (Pieter)
From 28377ffe246ed1db0e0d898fa6263eccdc68c490 Mon Sep 17 00:00:00 2001
From: PiBa-NL <piba.nl....@gmail.com>
Date: Sat, 15 Sep 2018 01:51:54 +0200
Subject: [PATCH] REGTEST/MINOR: loadtest: add a test for connection counters
after running a 4 x 10 looping requests
---
reg-tests/loadtest/b00000-loadtest.vtc | 99 ++++++++++++++++++++++++++
1 file changed, 99 insertions(+)
create mode 100644 reg-tests/loadtest/b00000-loadtest.vtc
diff --git a/reg-tests/loadtest/b00000-loadtest.vtc
b/reg-tests/loadtest/b00000-loadtest.vtc
new file mode 100644
index 00000000..590924e1
--- /dev/null
+++ b/reg-tests/loadtest/b00000-loadtest.vtc
@@ -0,0 +1,99 @@
+# Checks that request and connection counters are properly kept
+
+varnishtest "Connection counters check"
+feature ignore_unknown_macro
+
+server s1 {
+ rxreq
+ expect req.http.TESTsize == 10
+ txresp
+} -repeat 4 -start
+
+syslog Slg_1 -level notice {
+ recv
+} -repeat 15 -start
+
+haproxy h1 -W -conf {
+ global
+ nbthread 3
+ log ${Slg_1_addr}:${Slg_1_port} local0
+ #nokqueue
+
+ defaults
+ mode http
+ option dontlog-normal
+ log global
+ option httplog
+ timeout connect 3s
+ timeout client 4s
+ timeout server 15s
+
+ frontend fe1
+ bind "fd@${fe_1}"
+ acl donelooping hdr(TEST) -m len 10
+ http-request set-header TEST "%[hdr(TEST)]x"
+ use_backend b2 if donelooping
+ default_backend b1
+
+ backend b1
+ server srv1 ${h1_fe_1_addr}:${h1_fe_1_port}
+
+ frontend fe2
+ bind "fd@${fe_2}"
+ default_backend b2
+
+ backend b2
+ # haproxy 1.8 does not have the ,length converter.
+ #acl OK hdr(TEST) -m len 10
+ #http-request deny deny_status 200 if OK
+ #http-request deny deny_status 400
+
+ # haproxy 1.9 does have a ,length converter.
+ http-request set-header TESTsize "%[hdr(TEST),length]"
+ http-request del-header TEST
+ server srv2 ${s1_addr}:${s1_port}
+
+} -start
+
+barrier b1 cond 4
+
+client c1 -connect ${h1_fe_1_sock} {
+ timeout 17
+ barrier b1 sync
+ txreq -url "/"
+ rxresp
+ expect resp.status == 200
+} -start
+client c2 -connect ${h1_fe_1_sock} {
+ timeout 17
+ barrier b1 sync
+ txreq -url "/"
+ rxresp
+ expect resp.status == 200
+} -start
+client c3 -connect ${h1_fe_1_sock} {
+ timeout 17
+ barrier b1 sync
+ txreq -url "/"
+ rxresp
+ expect resp.status == 200
+} -start
+client c4 -connect ${h1_fe_1_sock} {
+ timeout 17
+ barrier b1 sync
+ txreq -url "/"
+ rxresp
+ expect resp.status == 200
+} -start
+
+client c1 -wait
+client c2 -wait
+client c3 -wait
+client c4 -wait
+
+haproxy h1 -cli {
+ send "show info"
+ expect ~ "CumConns: 41"
+ send "show info"
+ expect ~ "CumReq: 42"
+}
--
2.18.0.windows.1