Skip to content

fix: Ensure we set ports / addresses while waiting for pod IPs#4095

Open
lacroixthomas wants to merge 36 commits intoagones-dev:mainfrom
lacroixthomas:bugfixes/delays-awaiting-pod-ips
Open

fix: Ensure we set ports / addresses while waiting for pod IPs#4095
lacroixthomas wants to merge 36 commits intoagones-dev:mainfrom
lacroixthomas:bugfixes/delays-awaiting-pod-ips

Conversation

@lacroixthomas
Copy link
Collaborator

@lacroixthomas lacroixthomas commented Jan 21, 2025

What type of PR is this?
/kind bug

What this PR does / Why we need it:
Currently, the gameserver wait that the Pod IPs are populated before setting the ports and addresses

This seems to be blocking for a moment, we already have the ports and addresses from the node available, we should set them and keep waiting for the pod IPs until ready to move to GameServerStateScheduled (following this diagram: https://agones.dev/site/docs/reference/gameserver/#gameserver-state-diagram)

Which issue(s) this PR fixes:
Closes #3960

Special notes for your reviewer:

@github-actions github-actions bot added kind/bug These are bugs. size/S labels Jan 21, 2025
@lacroixthomas lacroixthomas changed the title fix: ensure we set ports addresses while waiting for pod IPs fix: Ensure we set ports / addresses while waiting for pod IPs Jan 21, 2025
@lacroixthomas
Copy link
Collaborator Author

Hello @0xaravindh
I've seen that you commented /gcbrun on my other PR which triggered the pipeline
Could you do it again for this one ? For me to do some manual testing with the new build 😄

@0xaravindh
Copy link

/gcbrun

@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: 1ce69844-72da-4b87-b2ca-e583f2e40f32

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@0xaravindh
Copy link

/gcbrun

@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: 396cc119-9ba3-48a5-b9d2-fe41781fda60

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@lacroixthomas
Copy link
Collaborator Author

@0xaravindh
I'm sorry to bother you again, can you re-comment for the pipeline ?

Or if there is a way to run it locally maybe ? Seems that it's the submit-e2e-test-cloud-build that is failing
Maybe it changed, but I previously be able to just push to run the pipeline, is it because it's in draft ?

@vicentefb
Copy link
Collaborator

/gcbrun

@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: c41e2f02-f528-4dee-ae6e-3e65d87da1fe

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@vicentefb
Copy link
Collaborator

Also, this is the guide to build it and test it locally https://github.com/googleforgames/agones/blob/main/build/README.md#testing-and-building

@vicentefb
Copy link
Collaborator

vicentefb commented Jan 22, 2025

It currently fails on lint errors. Those can be caught by running make lint https://github.com/googleforgames/agones/blob/bebe915cb4ccc83a8bb85d5ba106602ba47565c5/build/Makefile#L497

@lacroixthomas
Copy link
Collaborator Author

Also, this is the guide to build it and test it locally https://github.com/googleforgames/agones/blob/main/build/README.md#testing-and-building

Thanks ! I'm gonna have a look to run that locally

@lacroixthomas
Copy link
Collaborator Author

Alright, I ran both the e2e that were failing TestSuperTuxKartGameServerReady and TestCreateConnect, they are now passing locally, and also fixed the linter issue and checked with make lint, it should be all good now 😄

@vicentefb
Copy link
Collaborator

/gcbrun

@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: af9e5b00-fe91-42ac-b238-9f0b49b64aab

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@vicentefb
Copy link
Collaborator

/gcbrun

@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: bd45a8dc-7e0a-484b-a8ab-6d1f6f1b74e1

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/4095/head:pr_4095 && git checkout pr_4095
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.47.0-dev-ace3147

@lacroixthomas lacroixthomas marked this pull request as ready for review January 23, 2025 23:19
@lacroixthomas lacroixthomas force-pushed the bugfixes/delays-awaiting-pod-ips branch from ace3147 to 329bf81 Compare January 25, 2025 17:14
@0xaravindh
Copy link

/gcbrun

@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: 85654e2a-42c4-4649-8bcc-4032850ceaeb

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/4095/head:pr_4095 && git checkout pr_4095
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.47.0-dev-329bf81

@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: 81406e21-5e51-4172-8f8a-87a984964d65

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: eb63f4da-9f02-40a2-9217-1ad3723de503

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: b6bb2246-282d-4c58-95f6-4eea8baaa410

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/4095/head:pr_4095 && git checkout pr_4095
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.50.0-dev-8d8c27c

@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: f137c67f-70ce-4cb0-80d7-e9a013de56b2

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/4095/head:pr_4095 && git checkout pr_4095
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.50.0-dev-fd467fd

@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: 46db9ff4-a090-4f72-aec9-de503acaa727

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@lacroixthomas lacroixthomas mentioned this pull request Aug 13, 2025
5 tasks
@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: 2121ffc7-2975-405d-b802-f7b9c2d8562c

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/4095/head:pr_4095 && git checkout pr_4095
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.52.0-dev-a491f30

@markmandel
Copy link
Collaborator

I've totally forgotten where we are on this PR? 😄

@lacroixthomas
Copy link
Collaborator Author

Same here, I'll have a look, kind of forgot it, I think it was ready to go, but will need to double check first 😅

@lacroixthomas
Copy link
Collaborator Author

Will try to have a look at the end of the week, it's on my list*

@lacroixthomas
Copy link
Collaborator Author

@markmandel
I was checking my last changes, seems to be ready
It adds the podIP if it's available on:

  • syncGameServerCreatingState
  • syncGameServerStartingState
  • syncGameServerRequestReadyState

And also if it's not getting to be updated from the sync (because of other error) and the podIP is available, it does the update (syncGameServerRequestReadyState)

I'll wait for the e2e to pass, but it should be good for review 😄

@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: a7de9010-6e6e-49dd-8230-b7955fae8866

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: 9ffa9191-4010-4dcb-8e2d-f165949dfa41

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/4095/head:pr_4095 && git checkout pr_4095
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.53.0-dev-d6293c6

@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: 54f0d4e0-6499-499d-9464-ce5e066e6c39

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: 53c338f6-eaa5-4769-a298-16e8ed0ff730

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: 52c78d97-e31a-4c24-a6a0-ea2c28019d05

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/4095/head:pr_4095 && git checkout pr_4095
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.53.0-dev-010a278

@lacroixthomas
Copy link
Collaborator Author

Seems that the CLA was not signed by Ka****dh@google.com ? Could that be that he updated my PR with the main branch but didn't signed the CLA ? 🤔

if podIPUpdated {
// defer the update of the GameServer until the end of this function
// in case there is no gs state update and the podIP is available and populated
defer func(gs *agonesv1.GameServer, alreadyUpdated *bool) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This freaks me out a bunch 😆 - but you still end up with a double update, which seems unnecessary.

The way I wanted to this work was that whenever the Pod IP is updated, then the GameServer gets updated - unless it's already captured in an existing status update.

We shouldn't need to have a double updated if it's already seen inside one of these status change sync functions.

@markmandel
Copy link
Collaborator

Hope you don't mind - I have a pass at this in the works. Ended up being a bit easier than trying to explain what I was thinking.

@lacroixthomas
Copy link
Collaborator Author

Hope you don't mind - I have a pass at this in the works. Ended up being a bit easier than trying to explain what I was thinking.

Oh yeah no, please got for it, I totally forgot about this one 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Game servers are having some delays until getting external IPs from agones SDK

8 participants