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

Documentation: GameServer updates are not supported. No pods are created after switching image for GameServer #1724

Closed
aLekSer opened this issue Jul 29, 2020 · 4 comments · Fixed by #1935
Labels
good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! kind/documentation Documentation for Agones
Milestone

Comments

@aLekSer
Copy link
Collaborator

aLekSer commented Jul 29, 2020

What happened:
No pod got restarted and rescheduled after updating GameServer to a new image.

What you expected to happen:
Create a new pod for GameServer if its image parameter was updated.

How to reproduce it (as minimally and precisely as possible):

kubectl create -f https://raw.githubusercontent.com/googleforgames/agones/release-1.7.0/examples/simple-udp/gameserver.yaml
kubectl edit gameservers <name>
// Change image from udp-server:0.21 to udp-server:0.20
kubectl describe gameserver <name>
// See 0.20
kubectl describe pod <name>
// See 0.21

Anything else we need to know?:

Environment:

  • Agones version: 1.8.0-dev
  • Kubernetes version (use kubectl version): 1.15
  • Cloud provider or hardware configuration: GKE
  • Install method (yaml/helm): helm
  • Troubleshooting guide log(s):
  • Others:
@aLekSer aLekSer added the kind/bug These are bugs. label Jul 29, 2020
@markmandel
Copy link
Member

We really don't actually support editing GameServer spec (although a controller does make a small change to port values on update, because of old reasons).

So not sure if this is really a bug per se. I'm also concerned that if we add an extra validation webhook to GameServer, it may be a performance issue, since GameServers are on the hotpath - it would require some performance testing to confirm or not.

@aLekSer
Copy link
Collaborator Author

aLekSer commented Jul 29, 2020

@markmandel As a side issue - I found an infinite loop in the code. Which I am able to reproduce with a simple test:

	t.Parallel()
	fixture := dynamicGameServerFixture()

	t.Run("test allocated port counts", func(t *testing.T) {
... line 64:
		// single port dynamic
		fd := fixture.DeepCopy()
		fd.Spec.Ports[0].PortPolicy = ""
		pa.Allocate(fd)
		assert.Nil(t, err)
...
}

Will make a PR to fix this soon. We can have an empty string PortPolicy and no validations on Update. Could lead to this issue.
And internal allocate() would be called recursively forever.
Not sure how to reproduce this using kubectl only.
@akremsa can you also take a look since you have created a PR recently on this topic?

@aLekSer
Copy link
Collaborator Author

aLekSer commented Jul 29, 2020

I assume at least docs should contain that gameservers could not be updated.

@aLekSer aLekSer added the kind/documentation Documentation for Agones label Jul 29, 2020
@markmandel
Copy link
Member

I assume at least docs should contain that gameservers could not be updated.

Yeah, that totally makes sense!

@aLekSer aLekSer changed the title No pods are created after switching image for GameServer Documentation: GameServer updates are not supported. No pods are created after switching image for GameServer Jul 29, 2020
@aLekSer aLekSer removed the kind/bug These are bugs. label Jul 29, 2020
@roberthbailey roberthbailey added good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! labels Dec 17, 2020
@markmandel markmandel added this to the 1.12.0 milestone Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! kind/documentation Documentation for Agones
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants