skupperproject / skupper-router

An application-layer router for Skupper networks
https://skupper.io
Apache License 2.0
14 stars 19 forks source link

DISPATCH-1940 [http2] Router HTTP2 adaptor should pass h2spec #371

Closed jiridanek closed 4 months ago

jiridanek commented 2 years ago

https://issues.apache.org/jira/browse/DISPATCH-1940 revival

Baseline, nghttpd

Failures: 

Hypertext Transfer Protocol Version 2 (HTTP/2)
  5. Streams and Multiplexing
    5.1. Stream States
      5.1.1. Stream Identifiers
        using source address 10.0.2.100:39336
        × 2: Sends stream identifier that is numerically smaller than previous
          -> The endpoint MUST respond with a connection error of type PROTOCOL_ERROR.
             Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                       Connection closed
               Actual: DATA Frame (length:147, flags:0x01, stream_id:5)

With skupper-router 2.0.0:

https://github.com/jiridanek/skupper-router/runs/6135120437?check_suite_focus=true#step:5:3711

Failures: 

Generic tests for HTTP/2 server
  4. HTTP Message Exchanges
    using source address 10.0.2.100:35474
    × 2: Sends a HEAD request
      -> The endpoint MUST respond to the request.
         Expected: HEADERS Frame (stream_id:1)
           Actual: Timeout

Hypertext Transfer Protocol Version 2 (HTTP/2)
  5. Streams and Multiplexing
    5.1. Stream States
      5.1.1. Stream Identifiers
        using source address 10.0.2.100:35566
        × 2: Sends stream identifier that is numerically smaller than previous
          -> The endpoint MUST respond with a connection error of type PROTOCOL_ERROR.
             Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                       Connection closed
               Actual: DATA Frame (length:147, flags:0x01, stream_id:5)

    5.4. Error Handling
      5.4.1. Connection Error Handling
        using source address 10.0.2.100:35574
        × 1: Sends an invalid PING frame for connection close
          -> The endpoint MUST close the TCP connection
             Expected: Connection closed
               Actual: GOAWAY Frame (length:28, flags:0x00, stream_id:0)
jiridanek commented 2 years ago

Once, I got

Failures: 

Generic tests for HTTP/2 server
  3. Frame Definitions
    3.8. GOAWAY
      using source address 10.89.9.7:58168
      × 1: Sends a GOAWAY frame
        -> The endpoint MUST accept GOAWAY frame.
           Expected: Connection closed
                     PING Frame (length:8, flags:0x01, stream_id:0, opaque_data:h2spec
             Actual: Error: read tcp 10.89.9.7:58168->10.89.9.4:24162: read: connection reset by peer

  4. HTTP Message Exchanges
    using source address 10.89.9.7:58180
    × 2: Sends a HEAD request
      -> The endpoint MUST respond to the request.
         Expected: HEADERS Frame (stream_id:1)
           Actual: Timeout

Hypertext Transfer Protocol Version 2 (HTTP/2)
  5. Streams and Multiplexing
    5.1. Stream States
      5.1.1. Stream Identifiers
        using source address 10.89.9.7:58274
        × 2: Sends stream identifier that is numerically smaller than previous
          -> The endpoint MUST respond with a connection error of type PROTOCOL_ERROR.
             Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                       Connection closed
               Actual: DATA Frame (length:147, flags:0x01, stream_id:5)

    5.4. Error Handling
      5.4.1. Connection Error Handling
        using source address 10.89.9.7:58282
        × 1: Sends an invalid PING frame for connection close
          -> The endpoint MUST close the TCP connection
             Expected: Connection closed
               Actual: GOAWAY Frame (length:28, flags:0x00, stream_id:0)

  7. Error Codes
    using source address 10.89.9.7:58384
    × 1: Sends a GOAWAY frame with unknown error code
      -> The endpoint MUST NOT trigger any special behavior.
         Expected: Connection closed
                   PING Frame (length:8, flags:0x01, stream_id:0, opaque_data:h2spec
           Actual: Error: read tcp 10.89.9.7:58384->10.89.9.4:24162: read: connection reset by peer

Finished in 6.2364 seconds
146 tests, 141 passed, 0 skipped, 5 failed
jiridanek commented 1 year ago

Current results, with https://github.com/skupperproject/skupper-router/compare/main...jiridanek:skupper-router:jd_2023_02_06_http2_spec_all

2023-02-06T19:36:37.3034344Z h2spec: Failures:
2023-02-06T19:36:37.3034413Z h2spec: 
2023-02-06T19:36:37.3034579Z h2spec: Generic tests for HTTP/2 server
2023-02-06T19:36:37.3034705Z h2spec:   4. HTTP Message Exchanges
2023-02-06T19:36:37.3035541Z h2spec:     using source address 172.18.0.4:38098
2023-02-06T19:36:37.3035734Z h2spec:     × 2: Sends a HEAD request
2023-02-06T19:36:37.3037297Z skrouterd: 2023-02-06 19:36:36.939969 +0000 ROUTER_CORE (info) [C112][L632] Link attached: dir=out source={(dyn)<none> expire:link} target={<none> expire:link} (/build/src/router_core/connections.c:2120)
2023-02-06T19:36:37.3038839Z h2spec:       -> The endpoint MUST respond to the request.
2023-02-06T19:36:37.3038994Z h2spec:          Expected: HEADERS Frame (stream_id:1)
2023-02-06T19:36:37.3040125Z skrouterd: 2023-02-06 19:36:36.940030 +0000 PROTOCOL (error) [C112] Error in nghttp2_session_mem_recv rv=-902 (/build/src/adaptors/http2/http2_adaptor.c:2333)
2023-02-06T19:36:37.3040750Z h2spec:            Actual: Timeout
2023-02-06T19:36:37.3042368Z skrouterd: 2023-02-06 19:36:36.940092 +0000 PROTOCOL (error) [C112] HTTP NGHTTP2_ERR_CALLBACK_FAILURE (/build/src/adaptors/http2/http2_adaptor.c:2345)

[...]

2023-02-06T19:36:37.3058350Z h2spec:         × 2: Sends stream identifier that is numerically smaller than previous
2023-02-06T19:36:37.3087723Z h2spec:           -> The endpoint MUST respond with a connection error of type PROTOCOL_ERROR.
2023-02-06T19:36:37.3088952Z skrouterd: 2023-02-06 19:36:36.943666 +0000 ROUTER_CORE (info) [C1][L638] Link attached: dir=in source={<none> expire:link} target={amqp:/_topo/0/QDR/temp.n6GOV0SD95Yx71w expire:link} (/build/src/router_core/connections.c:2120)
2023-02-06T19:36:37.3089465Z h2spec:              Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
2023-02-06T19:36:37.3089775Z h2spec:                        Connection closed
2023-02-06T19:36:37.3090435Z h2spec:                Actual: DATA Frame (length:147, flags:0x01, stream_id:5)
2023-02-06T19:36:37.3091685Z skrouterd: 2023-02-06 19:36:36.945368 +0000 ROUTER_CORE (info) [C113][L639] Link attached: dir=in source={<none> expire:link} target={examples expire:link} (/build/src/router_core/connections.c:2120)
2023-02-06T19:36:37.3092150Z h2spec: 
2023-02-06T19:36:37.3092371Z h2spec: Finished in 20.5915 seconds
2023-02-06T19:36:37.3093096Z skrouterd: 2023-02-06 19:36:36.945546 +0000 ROUTER_CORE (info) [C113][L640] Link attached: dir=out source={(dyn)<none> expire:link} target={<none> expire:link} (/build/src/router_core/connections.c:2120)
2023-02-06T19:36:37.3093511Z h2spec: 146 tests, 144 passed, 0 skipped, 2 failed

https://github.com/jiridanek/skupper-router/actions/runs/4107176193/jobs/7086327591

TODO: this should be fixed thanks to using new proton https://github.com/skupperproject/skupper-router/issues/539 TODO: unsuppress https://github.com/skupperproject/skupper-router/issues/386

ganeshmurthy commented 4 months ago

We are deprecating the http2 adaptor and moving to use the http2 observers over TCP