Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e test TestDeployAllInOneDBLESS fails on kind environment #6317

Closed
randmonkey opened this issue Jul 12, 2024 · 1 comment · Fixed by #6358
Closed

e2e test TestDeployAllInOneDBLESS fails on kind environment #6317

randmonkey opened this issue Jul 12, 2024 · 1 comment · Fixed by #6358
Labels

Comments

@randmonkey
Copy link
Contributor

Recently TestDeployAllInOneDBLESS e2e test case running on kind environment fails on getting configuration from Kong gateway pods. The failure of dumping config is caused by port forwarding not work, like: https://github.com/Kong/kubernetes-ingress-controller/actions/runs/9902467231/job/27356436727.
The same case running on GKE passed, and also it can run on local kind env. Also, https://github.com/Kong/kubernetes-ingress-controller/actions/runs/9902467231/job/27356450395 fails for the same reason.
So there maybe some issue on forwarding ports in kind env on the GH runners.

@randmonkey
Copy link
Contributor Author

Some initial investigation: The bug may brought by the port forward. In https://github.com/Kong/kubernetes-ingress-controller/actions/runs/10156183607/job/28084180522 I found the following logs in containerd:

Jul 30 04:48:48 02395b46-f1c0-467f-a3f4-7b1a11c58af8-control-plane containerd[111]: time="2024-07-30T04:48:48.506492259Z" level=info msg="Portforward for \"e43da647715ba3da108503ab923de7e1b958e68ab28ad1fcc5d84ae0fba23e49\" returns URL \"http://127.0.0.1:38697/portforward/FPzjGfjD\""
Jul 30 04:48:48 02395b46-f1c0-467f-a3f4-7b1a11c58af8-control-plane containerd[111]: time="2024-07-30T04:48:48.506073622Z" level=info msg="Portforward for \"068e35fe60fce1f8df3b17acf387d5edef8fdf73906e26d35ed4eb44fb99f39e\" port []"
Jul 30 04:48:48 02395b46-f1c0-467f-a3f4-7b1a11c58af8-control-plane containerd[111]: time="2024-07-30T04:48:48.506604392Z" level=info msg="Portforward for \"068e35fe60fce1f8df3b17acf387d5edef8fdf73906e26d35ed4eb44fb99f39e\" returns URL \"http://127.0.0.1:38697/portforward/vnZioT1s\""
Jul 30 04:48:49 02395b46-f1c0-467f-a3f4-7b1a11c58af8-control-plane containerd[111]: time="2024-07-30T04:48:49.424115040Z" level=info msg="Executing port forwarding in network namespace \"/var/run/netns/cni-47c96e24-0177-b03f-3743-7a44cc616cd9\""
Jul 30 04:48:49 02395b46-f1c0-467f-a3f4-7b1a11c58af8-control-plane containerd[111]: time="2024-07-30T04:48:49.424217279Z" level=info msg="Executing port forwarding in network namespace \"/var/run/netns/cni-64bb1a3a-bb15-cad2-a6a4-ff0a7d9a0b00\""
Jul 30 04:48:50 02395b46-f1c0-467f-a3f4-7b1a11c58af8-control-plane containerd[111]: time="2024-07-30T04:48:50.429551269Z" level=info msg="Finish port forwarding for \"e43da647715ba3da108503ab923de7e1b958e68ab28ad1fcc5d84ae0fba23e49\" port 8444"
Jul 30 04:48:50 02395b46-f1c0-467f-a3f4-7b1a11c58af8-control-plane containerd[111]: time="2024-07-30T04:48:50.432018549Z" level=info msg="Finish port forwarding for \"068e35fe60fce1f8df3b17acf387d5edef8fdf73906e26d35ed4eb44fb99f39e\" port 8444"

The two containers are forwarded to the same port but different paths. While in our tests it receives 2 different ports:

    all_in_one_test.go:356: forwarding port 41283 to kong/proxy-kong-75cbf5f78c-xm7xt:8444
    all_in_one_test.go:356: forwarding port 37941 to kong/proxy-kong-75cbf5f78c-xvnwv:8444
    all_in_one_test.go:363: proxy pod kong/proxy-kong-75cbf5f78c-xvnwv: got the config
    all_in_one_test.go:362: 
        	Error Trace:	/home/runner/work/kubernetes-ingress-controller/kubernetes-ingress-controller/test/e2e/helpers_test.go:530
        	            				/home/runner/work/kubernetes-ingress-controller/kubernetes-ingress-controller/test/e2e/all_in_one_test.go:362
        	            				/opt/hostedtoolcache/go/1.22.3/x64/src/runtime/asm_amd64.s:1695
        	Error:      	Condition never satisfied
        	Test:       	TestDeployAllInOnePostgresGatewayDiscovery
        	Messages:   	"https://localhost:41283" didn't get the config

So there maybe bugs in picking and receiving proxy ports in port forwarding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant