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

Move Status > Address & Status > Ports population to Creating state processing #293

Closed
markmandel opened this issue Jul 18, 2018 · 0 comments
Assignees
Labels
kind/design Proposal discussing new features / fixes and how they should be implemented kind/feature New features for Agones
Milestone

Comments

@markmandel
Copy link
Member

Right now the IP and Ports of the GameServer is only populated when the GameServer is set to Ready.

Since this information may be needed by the GameServer process before the game server process actually wants to mark itself as Ready, we should make this available earlier. There doesn't seem to be a technical reason to wait until Ready - other than we need a Pod to know what the IP is - but we create one at the Creating state processing, so it shouldn't be an issue, so we can move the processing to there, and make it available at that point and time.

Implementation

https://github.com/GoogleCloudPlatform/agones/blob/master/pkg/gameservers/controller.go

Move the code that populates the Status.Address and Status.Ports from syncGameServerRequestReadyState to syncGameServerCreatingState

@markmandel markmandel added kind/feature New features for Agones kind/design Proposal discussing new features / fixes and how they should be implemented labels Jul 18, 2018
@markmandel markmandel added this to the 0.4.0 milestone Jul 30, 2018
@markmandel markmandel self-assigned this Aug 22, 2018
markmandel added a commit to markmandel/agones that referenced this issue Aug 24, 2018
Previously the IP and Ports of the GameServer were populated only when
the GameServer is set to Ready.

This information may be needed by the GameServer process before the
process actually wants to mark itself as Ready.

Therefore, port and address population has been moved to the `Creating` state
processing, as that is where the Pod is created, and therefore we have both
address and port information.

`GameServer` events now look like this:

```
Events:
  Type    Reason          Age   From                   Message
  ----    ------          ----  ----                   -------
  Normal  PortAllocation  17s   gameserver-controller  Port allocated
  Normal  Creating        16s   gameserver-controller  Pod simple-udp-fcf44 created
  Normal  Starting        16s   gameserver-controller  Address and Port populated
  Normal  Ready           15s   gameserver-controller  SDK.Ready() executed
```

Closes googleforgames#293
markmandel added a commit to markmandel/agones that referenced this issue Aug 24, 2018
Previously the IP and Ports of the GameServer were populated only when
the GameServer is set to Ready.

This information may be needed by the GameServer process before the
process actually wants to mark itself as Ready.

Therefore, port and address population has been moved to the `Creating` state
processing, as that is where the Pod is created, and therefore we have both
address and port information.

`GameServer` events now look like this:

```
Events:
  Type    Reason          Age   From                   Message
  ----    ------          ----  ----                   -------
  Normal  PortAllocation  17s   gameserver-controller  Port allocated
  Normal  Creating        16s   gameserver-controller  Pod simple-udp-fcf44 created
  Normal  Starting        16s   gameserver-controller  Address and Port populated
  Normal  Ready           15s   gameserver-controller  SDK.Ready() executed
```

Closes googleforgames#293
markmandel added a commit that referenced this issue Aug 26, 2018
Previously the IP and Ports of the GameServer were populated only when
the GameServer is set to Ready.

This information may be needed by the GameServer process before the
process actually wants to mark itself as Ready.

Therefore, port and address population has been moved to the `Creating` state
processing, as that is where the Pod is created, and therefore we have both
address and port information.

`GameServer` events now look like this:

```
Events:
  Type    Reason          Age   From                   Message
  ----    ------          ----  ----                   -------
  Normal  PortAllocation  17s   gameserver-controller  Port allocated
  Normal  Creating        16s   gameserver-controller  Pod simple-udp-fcf44 created
  Normal  Starting        16s   gameserver-controller  Address and Port populated
  Normal  Ready           15s   gameserver-controller  SDK.Ready() executed
```

Closes #293
victor-prodan pushed a commit to victor-prodan/agones that referenced this issue Sep 3, 2018
Previously the IP and Ports of the GameServer were populated only when
the GameServer is set to Ready.

This information may be needed by the GameServer process before the
process actually wants to mark itself as Ready.

Therefore, port and address population has been moved to the `Creating` state
processing, as that is where the Pod is created, and therefore we have both
address and port information.

`GameServer` events now look like this:

```
Events:
  Type    Reason          Age   From                   Message
  ----    ------          ----  ----                   -------
  Normal  PortAllocation  17s   gameserver-controller  Port allocated
  Normal  Creating        16s   gameserver-controller  Pod simple-udp-fcf44 created
  Normal  Starting        16s   gameserver-controller  Address and Port populated
  Normal  Ready           15s   gameserver-controller  SDK.Ready() executed
```

Closes googleforgames#293
victor-prodan pushed a commit to victor-prodan/agones that referenced this issue Sep 3, 2018
Previously the IP and Ports of the GameServer were populated only when
the GameServer is set to Ready.

This information may be needed by the GameServer process before the
process actually wants to mark itself as Ready.

Therefore, port and address population has been moved to the `Creating` state
processing, as that is where the Pod is created, and therefore we have both
address and port information.

`GameServer` events now look like this:

```
Events:
  Type    Reason          Age   From                   Message
  ----    ------          ----  ----                   -------
  Normal  PortAllocation  17s   gameserver-controller  Port allocated
  Normal  Creating        16s   gameserver-controller  Pod simple-udp-fcf44 created
  Normal  Starting        16s   gameserver-controller  Address and Port populated
  Normal  Ready           15s   gameserver-controller  SDK.Ready() executed
```

Closes googleforgames#293
slartibaartfast pushed a commit to slartibaartfast/agones that referenced this issue Sep 10, 2018
Previously the IP and Ports of the GameServer were populated only when
the GameServer is set to Ready.

This information may be needed by the GameServer process before the
process actually wants to mark itself as Ready.

Therefore, port and address population has been moved to the `Creating` state
processing, as that is where the Pod is created, and therefore we have both
address and port information.

`GameServer` events now look like this:

```
Events:
  Type    Reason          Age   From                   Message
  ----    ------          ----  ----                   -------
  Normal  PortAllocation  17s   gameserver-controller  Port allocated
  Normal  Creating        16s   gameserver-controller  Pod simple-udp-fcf44 created
  Normal  Starting        16s   gameserver-controller  Address and Port populated
  Normal  Ready           15s   gameserver-controller  SDK.Ready() executed
```

Closes googleforgames#293
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/design Proposal discussing new features / fixes and how they should be implemented kind/feature New features for Agones
Projects
None yet
Development

No branches or pull requests

1 participant