solo-io / gloo

The Feature-rich, Kubernetes-native, Next-Generation API Gateway Built on Envoy
https://docs.solo.io/
Apache License 2.0
4.09k stars 442 forks source link

TestK8sGateway/ListenerOptions/TestConfigureListenerOptions #10263

Open bewebi opened 6 hours ago

bewebi commented 6 hours ago

Which tests failed?

TestK8sGateway/ListenerOptions/TestConfigureListenerOptions

Initial Investigation

Initial investigation has shown this to be reproducible in a local environment, though I've only done so once on ~50 attempts so far and haven't been able to derive a lot from that In CI it failed twice on main the same day (once on min k8s version, once on max k8s version)

It does appear that the proxy is running but that the Gateway does not have the ListenerOption enforced as expected

This could plausibly be related to solo-io/solo-projects#7153, which concerned write events that do not trigger reconciliation in the controller, but more investigation is necessary

Additional Information

Logs here and here:

=== RUN   TestK8sGateway/ListenerOptions/TestConfigureListenerOptions
listeneroption.gateway.solo.io/buffer-limit created
want:
HttpResponse{StatusCode: 200, Body: &matchers.ContainSubstringMatcher{Substr:"Welcome to nginx!", Args:[]interface {}(nil)}, Headers: map[], Custom: <nil>}
stdout:
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

stderr:  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 10.96.136.33:8080...
* Connected to gloo-proxy-gw.default.svc.cluster.local (10.96.136.33) port 8080 (#0)
> GET / HTTP/1.1
> Host: example.com
> User-Agent: curl/7.83.1-DEV
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< server: envoy
< date: Thu, 31 Oct 2024 06:24:56 GMT
< content-type: text/html
< content-length: 615
< last-modified: Mon, 12 Aug 2024 14:28:31 GMT
< etag: "66ba1c0f-267"
< accept-ranges: bytes
< x-envoy-upstream-service-time: 0
< 
{ [615 bytes data]

100   615  100   615    0     0  26022      0 --:--:-- --:--:-- --:--:-- 26739
* Connection #0 to host gloo-proxy-gw.default.svc.cluster.local left intact

success: &{StdErr:  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 10.96.136.33:8080...
* Connected to gloo-proxy-gw.default.svc.cluster.local (10.96.136.33) port 8080 (#0)
> GET / HTTP/1.1
> Host: example.com
> User-Agent: curl/7.83.1-DEV
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< server: envoy
< date: Thu, 31 Oct 2024 06:24:56 GMT
< content-type: text/html
< content-length: 615
< last-modified: Mon, 12 Aug 2024 14:28:31 GMT
< etag: "66ba1c0f-267"
< accept-ranges: bytes
< x-envoy-upstream-service-time: 0
< 
{ [615 bytes data]

100   615  100   615    0     0  26022      0 --:--:-- --:--:-- --:--:-- 26739
* Connection #0 to host gloo-proxy-gw.default.svc.cluster.local left intact
 StdOut:<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>
}Forwarding from 127.0.0.1:19000 -> 19000
Forwarding from [::1]:19000 -> 19000
Handling connection for 19000
...
Handling connection for 19000
=== NAME  TestK8sGateway
    lis_opt_suite.go:124: 
        Timed out after 10.001s.
        The function passed to Eventually failed at /home/runner/work/gloo/gloo/test/kubernetes/e2e/features/listener_options/lis_opt_suite.go:119 with:
        Expected
            <uint32>: 0
        to be equivalent to
            <int>: 42000
listeneroption.gateway.solo.io "buffer-limit" deleted
=== NAME  TestK8sGateway/ListenerOptions/TestConfigureListenerOptions
    testing.go:1577: test executed panic(nil) or runtime.Goexit: subtest may have called FailNow on a parent test
gateway.gateway.networking.k8s.io "gw" deleted
httproute.gateway.networking.k8s.io "example-route" deleted
service "example-svc" deleted
pod "nginx" deleted
namespace "curl" deleted
pod "curl" deleted
bewebi commented 6 hours ago

This has also occurred when invoked from EE here