infracloudio / ifc-rw-codecollection

test codebundle for runwhen
Apache License 2.0
0 stars 0 forks source link

Fixes secrets and environment variables #11

Closed saurabh3460 closed 5 months ago

saurabh3460 commented 5 months ago

Issues with test scripts:

test/runbook/dev-cluster/

On running test.sh and try to port forward the svc it gives this error:

E0202 16:27:46.564899  183812 portforward.go:409] an error occurred forwarding 3000 -> 3000: error forwarding port 3000 to pod 4c05eab3e2397bf4af65ed2d24e78a6d55c97d59478ba015ab665c73b6089d0c, uid : failed to execute portforward in network namespace "/var/run/netns/cni-2c9c80bd-0b86-2e2f-fdbc-99253f5c7f7b": failed to connect to localhost:3000 inside namespace "4c05eab3e2397bf4af65ed2d24e78a6d55c97d59478ba015ab665c73b6089d0c", IPv4: dial tcp4 127.0.0.1:3000: connect: connection refused IPv6 dial tcp6: address localhost: no suitable address found
error: lost connection to pod

tests/sli/dev-cluster/

here as well we get similar issue as above since we also expose in this test.sh as well.

➜  dev-cluster git:(fix/rds) Forwarding from 127.0.0.1:3000 -> 3000
Forwarding from [::1]:3000 -> 3000
Handling connection for 3000
Handling connection for 3000
E0202 16:35:25.305747  184608 portforward.go:409] an error occurred forwarding 3000 -> 3000: error forwarding port 3000 to pod 06472f51d0d8ce9eb2cd91e5e89772a35b8d85a117f4c08f8c6f4ec2f9d85cac, uid : failed to execute portforward in network namespace "/var/run/netns/cni-3eac589c-7041-d795-211f-ea155222384b": failed to connect to localhost:3000 inside namespace "06472f51d0d8ce9eb2cd91e5e89772a35b8d85a117f4c08f8c6f4ec2f9d85cac", IPv4: dial tcp4 127.0.0.1:3000: connect: connection refused IPv6 dial tcp6: address localhost: no suitable address found
E0202 16:35:25.305747  184608 portforward.go:409] an error occurred forwarding 3000 -> 3000: error forwarding port 3000 to pod 06472f51d0d8ce9eb2cd91e5e89772a35b8d85a117f4c08f8c6f4ec2f9d85cac, uid : failed to execute portforward in network namespace "/var/run/netns/cni-3eac589c-7041-d795-211f-ea155222384b": failed to connect to localhost:3000 inside namespace "06472f51d0d8ce9eb2cd91e5e89772a35b8d85a117f4c08f8c6f4ec2f9d85cac", IPv4: dial tcp4 127.0.0.1:3000: connect: connection refused IPv6 dial tcp6: address localhost: no suitable address found
error: lost connection to pod

@Hashfyre

Hashfyre commented 5 months ago

Solution for https://github.com/infracloudio/ifc-rw-codecollection/pull/11#issuecomment-1923584249 (via slack)

[SOLVED] we were overriding the log serving python server by overring cmd from k8s manisfest there was no python server / pid running or serving anything at 3000 inside the container, hence failing the port-forward we should just kubectl exec ro /.../runbook.robot