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

Aggregate Counter Status Errors When Capacity Is Greater Than int64 #3604

Closed
igooch opened this issue Jan 22, 2024 · 0 comments · Fixed by #3605
Closed

Aggregate Counter Status Errors When Capacity Is Greater Than int64 #3604

igooch opened this issue Jan 22, 2024 · 0 comments · Fixed by #3605
Assignees
Labels
kind/bug These are bugs.

Comments

@igooch
Copy link
Collaborator

igooch commented Jan 22, 2024

What happened:

When a game server counter capacity is set to max(int64), and the fleet has more than one replica, then the fleet is unable to create game servers because the fleet aggregate counter capacity is 2 * max(int64), which errors.

When the game server counter capacity is max(int64) / replicas, then there is no issue, and the fleet is able to create the game servers.

What you expected to happen:

I would expect the fleet to still be able to create the game servers with max(int64).

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

Install Agones with CountsAndLists set to true.
Apply the below fleet.yaml:

apiVersion: agones.dev/v1
kind: Fleet
metadata:
  name: simple-game-server
spec:
  replicas: 2
  template:
    spec:
      ports:
        - name: default
          containerPort: 7654
      counters:
        sessions:
          count: 0
          capacity: 9223372036854775807
      template:
        spec:
          containers:
            - name: simple-game-server
              image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.24

Environment:

  • Agones version: 1.38.0-dev
  • Kubernetes version (use kubectl version): v1.28.5
  • Cloud provider or hardware configuration: v1.28.3-gke.1203001
  • Install method (yaml/helm): helm
  • Troubleshooting guide log(s):
    From the agones-controller:
"status": {
      "code": 9,
      "message": "GameServer.agones.dev \"simple-game-server-shxn9-dffx9\" is invalid: status.counters.sessions.capacity: Invalid value: \"number\": status.counters.sessions.capacity in body must be of type integer: \"number\""
    }

Anything else we need to know?:

Suggested resolution:

In cases where the AggregatedCounterStatus number would be greater than max(int64), then max(int64).

  • updateFleetStatus in agones/pkg/fleets/controller.go
  • aggregateCounters in agones/pkg/gameserversets/controller.go

We would also need to add documentation that anything that aggregates past max(int64) maxes out aggregating, and potentially breaks fleet autoscaling based on counter status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug These are bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants