--- FAIL: TestGameServerWithPortsMappedToMultipleContainers (41.07s)
gameserver_test.go:527: Could not message GameServer: read udp 192.168.10.2:45098->35.233.192.59:7273: read: connection refused
Seen this crop up a few times.
I think there is a problem with two containers started listening the port at different time.
The Fleet configuration from the test is:
apiVersion: "agones.dev/v1"
kind: Fleet
metadata:
name: simple-udp
spec:
replicas: 2
template:
spec:
container: simple-udp
ports:
- name: default
containerPort: 7654
- name: second-gameport
containerPort: 5000
container: "second-udp-server"
template:
spec:
containers:
- name: simple-udp
image: gcr.io/agones-images/udp-server:0.19
resources:
requests:
memory: "64Mi"
cpu: "20m"
limits:
memory: "64Mi"
cpu: "20m"
- name: second-udp-server
image: gcr.io/agones-images/udp-server:0.19
args: ["-port", "5000"]
Easy solution might be to poll the UDP pings for a minute until it works, to account for some delay.
Most helpful comment
Easy solution might be to poll the UDP pings for a minute until it works, to account for some delay.