Hi Pieter,
Post by PiBa-NLPost by Willy TarreauPost by PiBa-NL option http-use-htx
The test no longer completes successfully, is this 'by design' ? It seems
its not closing the server connection? Or at least not logging so, which i
guess is why the log line isn't emitted at the same 'expected' time?
It's not expected that the connection is not closed,
After some additional testing I think the connection is and was properly
closed. Just the logging was a bit strange.
I've got another report of weird logging that went away with a recent
fix (sorry I don't remember which commit, these days bugs come and go).
Post by PiBa-NLPost by Willy Tarreauhowever since the log
happens at slightly different stages it could be possible that it's just a
matter of event logging. In any case we'll have to have a look.
Weird additional issue was that adding a 'option htttplog' changed the
number of syslog lines produced. Instead of 2 connect lines, it shows 1 http
log line. That is with the 'old' -dev9 version, current master branch seems
to have fixed this already.
I *think* it was the same then.
Post by PiBa-NLPost by Willy TarreauBy the way we've been thinking how to easily run the same tests with and
without HTX. I wanted to support "ifdef" in the config but it's a bit late
now. For the time being, I found that we could do something very ugly like
${HTX} http-use-htx
and set the "HTX" variable to either "option" or "desc" (latter being to
ignore the keyword by making it the proxy's description). With minor
changes to the config parser (dropping leading empty words), we could
have "$NOHTX" option http-use-htx and set "NOHTX" to "no" to disable
it.
I'm not sure how feasible this is in the end. I like the ability to also
just run a test directly outside of the run-regtests.sh script. And get the
same pass/fail result.
When using such a $NOHTX 'trick' The test would need to always be run twice
with different parameters to perform a 'complete' test of all haproxy
features in the current build.
Yes I agree. I've also a bit changed my mind on this after discussing
with Olivier and Christopher yesterday. We were discussing about the
tests to add to validate HTTP processing and while discussing about
outgoing H2, I realized that such a configuration cannot exist without
HTX anyway so such a conf would not work, and we'd still need to
duplicate some tests anyway. Thus in the end better keep some partial
duplication for now and later we'll see how to possibly improve this
(e.g. we could imagine having some test generation scripts later if
needed).
Post by PiBa-NLAlso what would the minimum required haproxy
version for such a test become, would it be 1.9 or 1.8 which wouldn't know
what 'no option http-use-htx' means.?
That's the one I wanted to address by using the "description" keyword as
a way to comment out the line, but it's ugly and will not make us move
far enough.
Post by PiBa-NLAnd even then the specific
/connection/b00000.vtc test currently succeeds only with htx if also the
HTTP/1.1 is changed to HTTP/2.0 in the expected syslog output.
Good point.
Post by PiBa-NLWhich i'm not sure if it is or isn't a desired effect/change.?.
It's expected that we have the real version in the logs. However without
HTX since H2 is translated to H1 before being processed, we really have
H1 in the logs.
Post by PiBa-NLWhen testing with 1.6 the /connection/b00000.vtc needs to be run without
threads. And with 1.5 the config would need to change again to not include
While I value the backwards compatibility which helps us get a bit more
confidence while working on stable branches, we have to keep in mind that
the regtests were not introduced for this but to help developers verify
they didn't break something obvious before committing. So whatever benefit
a test can bring to older version is good and appreciated, but I really
do not want to complicate tests' writing nor maintenance just for the
sake of backwards compatibility, or it will divert them from their
initial purpose.
Post by PiBa-NLIn the end it probably becomes tricky to use 1 'master set' of tests that
can be run against any older version, without duplicating tests or including
some more advanced ifdef constructions as you already mentioned. Which i
think would need to be supported by the 'testing framework', not by haproxy
itself.
I'd really like them for haproxy at least for my own configs : every time
I migrate a server to a new version, I want to test the new features, and
if something breaks I have to roll back and comment out all the stuff I
added. Similarly, sometimes I'm seeing configs with "bind ... process x/y"
that trigger warnings due to nbproc/nbthread not matching. There are a
number of valid use cases for having ifdef in configurations that need
to be regularly modified or that need to adapt to changing versions. That
doesn't mean we can't have that for the tests as well of course!
Post by PiBa-NLMaybe 'vtest' will eventually have such abilities? Or perhaps the
vtc test file would need a little pre-processing, before passing it to
varnishtest. Though that doesn't really make things easier/faster either..
Indeed!
Cheers,
Willy