Agones: error updating fleetautoscaler status when LastScaleTime is nil

Created on 15 Jan 2021  路  4Comments  路  Source: googleforgames/agones

What happened: Upon upgrading to Agones 1.11, we are encountering the following error until the fleet scales: "error updating status for fleetautoscaler autoscaler-name: FleetAutoscaler.autoscaling.agones.dev \"our-name-here\" is invalid: status.lastScaleTime: Invalid value: \"null\": status.lastScaleTime in body must be of type string: \"null\""

What you expected to happen: We expected there to be no issue with the optional lastScaleTime field. Presumably this is expected to be nil until the fleet actually scales.

How to reproduce it (as minimally and precisely as possible): On Agones 1.11/Kubernetes 1.17. Warm up a fleet. Observe the above error until the fleet scales.

Anything else we need to know?:

Environment:

  • Agones version: 1.11
  • Kubernetes version (use kubectl version): 1.17.14-gke.1600
  • Cloud provider or hardware configuration: GCP
  • Install method (yaml/helm): Helm
  • Troubleshooting guide log(s):
""error updating status for fleetautoscaler autoscaler-name: FleetAutoscaler.autoscaling.agones.dev \"our-name-here\" is invalid: status.lastScaleTime: Invalid value: \"null\": status.lastScaleTime in body must be of type string: \"null\""

["agones.dev/agones/pkg/fleetautoscalers.(*Controller).updateStatus\n\t/go/src/agones.dev/agones/pkg/fleetautoscalers/controller.go:271","agones.dev/agones/pkg/fleetautoscalers.(*Controller).syncFleetAutoscaler\n\t/go/src/agones.dev/agones/pkg/fleetautoscalers/controller.go:230","agones.dev/agones/pkg/util/workerqueue.(*WorkerQueue).processNextWorkItem\n\t/go/src/agones.dev/agones/pkg/util/workerqueue/workerqueue.go:153","agones.dev/agones/pkg/util/workerqueue.(*WorkerQueue).runWorker\n\t/go/src/agones.dev/agones/pkg/util/workerqueue/workerqueue.go:129","k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\t/go/src/agones.dev/agones/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:152","k8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/go/src/agones.dev/agones/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:153","k8s.io/apimachinery/pkg/util/wait.Until\n\t/go/src/agones.dev/agones/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88","agones.dev/agones/pkg/util/workerqueue.(*WorkerQueue).run\n\t/go/src/agones.dev/agones/pkg/util/workerqueue/workerqueue.go:187","runtime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1373"]
  • Others: We are thinking that the LastScaleTime *metav1.Time field might benefit from the json:omitempty" tag.
kinbug areuser-experience

Most helpful comment

That's something at least (all our e2e tests passed), but I'll still replicate and get that fixed. I've got a pretty good idea of what it is.

All 4 comments

Doh! Sounds like I missed a nullable: true in the move to CRD v1 spec. I'll get a fix in today for the upcoming release.

Is it causing functionality issues, or just error messages?

Doh! Sounds like I missed a nullable: true in the move to CRD v1 spec. I'll get a fix in today for the upcoming release.

Is it causing functionality issues, or just error messages?

It seems to just be error messages, the fleets themselves appear to be scaling as expected so far after the upgrade.

That's something at least (all our e2e tests passed), but I'll still replicate and get that fixed. I've got a pretty good idea of what it is.

Aha! Needed to use kubectl apply on a yaml file to get it to fire. Fix incoming.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markmandel picture markmandel  路  6Comments

markmandel picture markmandel  路  4Comments

adamhosier picture adamhosier  路  5Comments

jehan96 picture jehan96  路  5Comments

markmandel picture markmandel  路  6Comments