Hi Christopher, Willy,

Op 20-11-2018 om 12:09 schreef Christopher Faulet:

Hi,

The H2 is not yet compatible with the HTX for now. So you should never use both in same time. However, this configuration error should be detected during the configuration parsing, to avoid runtime errors. Here is a patch to do so. I'll merge it.

Thanks
--
Christopher Faulet

Thanks the 'old' config which tried to combine H2 and HTX is now rejected. (as expected)

I guess i misinterpreted the 'need' for HTX for the H2 conversion and features which i thought would include the new keep-alive this version brings, but i guess those are separate things. Keepalive for a H1 backend coming from a H2 frontend works fine without using that option.

New testcase attached, one that actually works! , regarding H2 > H1 with keepalive. (without HTX option though..) It shows as 'passed' when run.

I did notice there is one line regarding the 'double logging' I have got configured though which I'm not sure is supposed to happen, its seems to be because i'm having both stdout and :514 logging should that not be possible?: ***  h1    0.0 debug|[ALERT] 323/233813 (57777) : sendmsg()/writev() failed in logger #2: Socket operation on non-socket (errno=38)

Partial config:
  global
    log stdout format raw daemon
    log :1514 local0

I'm using "HA-Proxy version 1.9-dev7-7ff4f14 2018/11/20" this time.

Or is it (again) something i'm configuring wrongly ? ;) .

Regards,
PiBa-NL (Pieter)

# h2 with h1 backend connection reuse check

varnishtest "h2 with h1 backend connection reuse check"
feature ignore_unknown_macro

#REQUIRE_VERSION=1.9

server s1 {
  rxreq
  txresp -gziplen 200
  rxreq
  txresp -gziplen 200
} -start

server s2  {
  stream 0 {
    rxsettings
    txsettings -ack
  } -run
  stream 1 {
    rxreq
    txresp -bodylen 200
  } -run
  stream 3 {
    rxreq
    txresp -bodylen 200
  } -run
} -start

server s3 -repeat 2 {
  rxreq
  txresp -gziplen 200
} -start

server s4 {
  timeout 3
  rxreq
  txresp -gziplen 200
  rxreq
  txresp -gziplen 200
} -start

server s5 {
  timeout 3
  rxreq
  txresp -gziplen 200
  rxreq
  txresp -gziplen 200
} -start

haproxy h1 -conf {
  global
    #nbthread 3
    log stdout format raw daemon
    log :1514 local0
    stats socket /tmp/haproxy.socket level admin

  defaults
    mode http
    #option dontlog-normal
    log global
    option httplog
    timeout connect         3s
    timeout client          40s
    timeout server          40s

  listen fe1
    bind "fd@${fe1}"
    server srv1 ${s1_addr}:${s1_port}

  listen fe3
    bind "fd@${fe3}" proto h2
    server srv3 ${s3_addr}:${s3_port}

  listen fe4
    bind "fd@${fe4}" proto h2
    server srv4 ${s4_addr}:${s4_port}

  listen fe5
    bind "fd@${fe5}" ssl crt /usr/ports/net/haproxy-devel/test/common.pem alpn 
h2 
    server srv5 ${s5_addr}:${s5_port} 

} -start


client c1 -connect ${h1_fe1_sock} {
    txreq -url "/1"
    rxresp
    expect resp.status == 200
    txreq -url "/2"
    rxresp
    expect resp.status == 200
} -start
client c1 -wait

client c2 -connect ${s2_sock} {
        stream 0 {
                txsettings -hdrtbl 0
                rxsettings
        } -run
        stream 1 {
              txreq -req GET -url /3
                rxresp
                expect resp.status == 200
        } -run
        stream 3 {
              txreq -req GET -url /4
                rxresp
                expect resp.status == 200
        } -run
} -start
client c2 -wait

client c3 -connect ${h1_fe3_sock} {
        stream 0 {
                txsettings -hdrtbl 0
                rxsettings
        } -run
        stream 1 {
              txreq -req GET -url /3
                rxresp
                expect resp.status == 200
        } -run
        stream 3 {
              txreq -req GET -url /4
                rxresp
                expect resp.status == 200
        } -run
} -start
client c3 -wait

client c4 -connect ${h1_fe4_sock} {
        stream 0 {
                txsettings -hdrtbl 0
                rxsettings
        } -run
       stream 1 {
              txreq -req GET -url /3
                rxresp
                expect resp.status == 200
        } -run
        stream 3 {
              txreq -req GET -url /4
                rxresp
                expect resp.status == 200
        } -run
} -start
client c4 -wait

shell {
    HOST=${h1_fe5_addr}
    if [ "${h1_fe5_addr}" = "::1" ] ; then
        HOST="\[::1\]"
    fi
    curl --http2 -i -k https://$HOST:${h1_fe5_port}/CuRLtesT_1/ 
https://$HOST:${h1_fe5_port}/CuRLtesT_2/
}

server s1 -wait
server s2 -wait
server s3 -wait
server s4 -wait
server s5 -wait

Reply via email to