dgkanatsios / azuregameserversscalingkubernetes

Scaling Dedicated Game Servers on Azure Kubernetes Service
MIT License
39 stars 16 forks source link

New regression bug - deleting a Pod will not have another one recreated #44

Closed dgkanatsios closed 6 years ago

dgkanatsios commented 6 years ago

Probably introduced by one of the latest commits

dgkanatsios commented 6 years ago

Issue is caused by this line

if !object.GetDeletionTimestamp().IsZero() {

on DGSController.go

Controller logs

time="2018-09-18T19:02:42Z" level=info msg="DedicatedGameServer controller - update pod"
time="2018-09-18T19:02:42Z" level=info msg="Pod is being terminated" Pod=simplenodejsudp-collection-example-pstdw-vdxce
time="2018-09-18T19:03:13Z" level=info msg="DedicatedGameServer controller - update pod"
time="2018-09-18T19:03:13Z" level=info msg="Pod is being terminated" Pod=simplenodejsudp-collection-example-pstdw-vdxce
time="2018-09-18T19:03:23Z" level=info msg="DedicatedGameServer controller - update pod"
time="2018-09-18T19:03:23Z" level=info msg="Pod is being terminated" Pod=simplenodejsudp-collection-example-pstdw-vdxce
time="2018-09-18T19:03:23Z" level=info msg="DedicatedGameServer controller - delete pod"
time="2018-09-18T19:03:23Z" level=info msg="Pod is being terminated" Pod=simplenodejsudp-collection-example-pstdw-vdxce
dgkanatsios commented 6 years ago

This line https://github.com/dgkanatsios/azuregameserversscalingkubernetes/blob/f99b02676c486ac6676a8ccf7b46332abd3cf3b5/controller/DGSController.go#L158 must be moved into syncHandler in a way that a new Pod will be created if the timestamp is != zero.