diff --git a/pkg/gameservers/controller.go b/pkg/gameservers/controller.go index 4c1ea16d30..9e3976cce0 100644 --- a/pkg/gameservers/controller.go +++ b/pkg/gameservers/controller.go @@ -823,7 +823,7 @@ func (c *Controller) syncGameServerRequestReadyState(gs *agonesv1.GameServer) (* // check to make sure this container is actually running. If there was a recent crash, the cache may // not yet have the newer, running container. if cs.State.Running == nil { - return nil, errors.New("game server container is not currently running, try again") + return nil, fmt.Errorf("game server container for GameServer %s in namespace %s is not currently running, try again", gsCopy.ObjectMeta.Name, gsCopy.ObjectMeta.Namespace) } gsCopy.ObjectMeta.Annotations[agonesv1.GameServerReadyContainerIDAnnotation] = cs.ContainerID } diff --git a/pkg/gameservers/controller_test.go b/pkg/gameservers/controller_test.go index 42cd64c7bd..fa5b5ac913 100644 --- a/pkg/gameservers/controller_test.go +++ b/pkg/gameservers/controller_test.go @@ -1314,7 +1314,7 @@ func TestControllerSyncGameServerRequestReadyState(t *testing.T) { defer cancel() _, err = c.syncGameServerRequestReadyState(gsFixture) - assert.EqualError(t, err, "game server container is not currently running, try again") + assert.EqualError(t, err, "game server container for GameServer test in namespace default is not currently running, try again") assert.False(t, gsUpdated, "GameServer was updated") })