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

Fleet update strategy: Replace #199

Merged
merged 1 commit into from
May 14, 2018

Conversation

markmandel
Copy link
Member

When the template for a Fleet is edited, a deployment strategy can be defined. At the moment, this is just the Replace strategy, which terminates all current non-allocated GameServers and immediately starts up new GameServers to replace them.

Includes documentation as well.

@markmandel markmandel added kind/feature New features for Agones kind/documentation Documentation for Agones labels May 8, 2018
@markmandel markmandel added this to the 0.2 milestone May 8, 2018
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 03705ece-f3ca-4033-8039-af427c17c88d

Build Logs
starting build "03705ece-f3ca-4033-8039-af427c17c88d"

FETCHSOURCE
Initialized empty Git repository in /workspace/.git/
From https://source.developers.google.com/p/agones-images/r/agones
 * branch            bc820a0ea0d1594d3dd2025546f14a53dde43e07 -> FETCH_HEAD
HEAD is now at bc820a0 Fleet update strategy: Replace
BUILD
Starting Step #0
Step #0: Already have image (with digest): ubuntu
Finished Step #0
Starting Step #1
Step #1: Already have image (with digest): gcr.io/cloud-builders/docker
Step #1: Sending build context to Docker daemon  131.1MB

Step #1: Step 1/3 : FROM gcr.io/cloud-builders/docker
Step #1:  ---> 2583351a5f17
Step #1: Step 2/3 : RUN apt-get install make
Step #1:  ---> Running in aeca7baa0c38
Step #1: Reading package lists...
Step #1: Building dependency tree...
Step #1: Reading state information...
Step #1: Suggested packages:
Step #1:   make-doc
Step #1: The following NEW packages will be installed:
Step #1:   make
Step #1: 0 upgraded, 1 newly installed, 0 to remove and 33 not upgraded.
Step #1: Need to get 151 kB of archives.
Step #1: After this operation, 365 kB of additional disk space will be used.
Step #1: Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 make amd64 4.1-6 [151 kB]
Step #1: �[91mdebconf: unable to initialize frontend: Dialog
Step #1: �[0m�[91mdebconf: (TERM is not set, so the dialog frontend is not usable.)
Step #1: �[0m�[91mdebconf: falling back to frontend: Readline
Step #1: �[0m�[91mdebconf: unable to initialize frontend: Readline
Step #1: �[0m�[91mdebconf: (This frontend requires a controlling tty.)
Step #1: �[0m�[91mdebconf: falling back to frontend: Teletype
Step #1: �[0m�[91mdpkg-preconfigure: unable to re-open stdin: 
Step #1: �[0mFetched 151 kB in 0s (154 kB/s)
Step #1: Selecting previously unselected package make.
Step #1: (Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 11239 files and directories currently installed.)
Step #1: Preparing to unpack .../archives/make_4.1-6_amd64.deb ...
Step #1: Unpacking make (4.1-6) ...
Step #1: Setting up make (4.1-6) ...
Step #1: Removing intermediate container aeca7baa0c38
Step #1:  ---> 55f4cd8124cf
Step #1: Step 3/3 : ENTRYPOINT ["/usr/bin/make"]
Step #1:  ---> Running in c4b992828587
Step #1: Removing intermediate container c4b992828587
Step #1:  ---> 5f65019ba93c
Step #1: Successfully built 5f65019ba93c
Step #1: Successfully tagged make-docker:latest
Finished Step #1
Starting Step #2
Step #2: Already have image: make-docker
Step #2: docker pull gcr.io/agones-images/agones-build:e52ce865fb && docker tag gcr.io/agones-images/agones-build:e52ce865fb agones-build:e52ce865fb
Step #2: e52ce865fb: Pulling from agones-images/agones-build
Step #2: c73ab1c6897b: Pulling fs layer
Step #2: 3091fac74ac3: Pulling fs layer
Step #2: 32ec8f15f1df: Pulling fs layer
Step #2: 8a19269d40b4: Pulling fs layer
Step #2: e6425ad9525a: Pulling fs layer
Step #2: 16df2efc4858: Pulling fs layer
Step #2: 2b2d73ab4219: Pulling fs layer
Step #2: 5f2d382df949: Pulling fs layer
Step #2: 5b739d0afd39: Pulling fs layer
Step #2: eb921739ae12: Pulling fs layer
Step #2: 2022ec0c796a: Pulling fs layer
Step #2: 3ee570d976e5: Pulling fs layer
Step #2: 59f7198d9c1c: Pulling fs layer
Step #2: 08501ff593d9: Pulling fs layer
Step #2: a5d32e6825a2: Pulling fs layer
Step #2: 42602390dd8d: Pulling fs layer
Step #2: 8a19269d40b4: Waiting
Step #2: e6425ad9525a: Waiting
Step #2: 16df2efc4858: Waiting
Step #2: 2b2d73ab4219: Waiting
Step #2: 5f2d382df949: Waiting
Step #2: 5b739d0afd39: Waiting
Step #2: eb921739ae12: Waiting
Step #2: 2022ec0c796a: Waiting
Step #2: 3ee570d976e5: Waiting
Step #2: 59f7198d9c1c: Waiting
Step #2: 08501ff593d9: Waiting
Step #2: a5d32e6825a2: Waiting
Step #2: 42602390dd8d: Waiting
Step #2: c73ab1c6897b: Verifying Checksum
Step #2: c73ab1c6897b: Download complete
Step #2: 8a19269d40b4: Verifying Checksum
Step #2: 8a19269d40b4: Download complete
Step #2: 3091fac74ac3: Verifying Checksum
Step #2: 3091fac74ac3: Download complete
Step #2: e6425ad9525a: Verifying Checksum
Step #2: e6425ad9525a: Download complete
Step #2: 16df2efc4858: Verifying Checksum
Step #2: 16df2efc4858: Download complete
Step #2: 5f2d382df949: Verifying Checksum
Step #2: 5f2d382df949: Download complete
Step #2: c73ab1c6897b: Pull complete
Step #2: 5b739d0afd39: Verifying Checksum
Step #2: 5b739d0afd39: Download complete
Step #2: eb921739ae12: Verifying Checksum
Step #2: eb921739ae12: Download complete
Step #2: 2b2d73ab4219: Verifying Checksum
Step #2: 2b2d73ab4219: Download complete
Step #2: 3ee570d976e5: Verifying Checksum
Step #2: 3ee570d976e5: Download complete
Step #2: 59f7198d9c1c: Verifying Checksum
Step #2: 59f7198d9c1c: Download complete
Step #2: 08501ff593d9: Verifying Checksum
Step #2: 08501ff593d9: Download complete
Step #2: a5d32e6825a2: Verifying Checksum
Step #2: a5d32e6825a2: Download complete
Step #2: 2022ec0c796a: Verifying Checksum
Step #2: 2022ec0c796a: Download complete
Step #2: 42602390dd8d: Verifying Checksum
Step #2: 42602390dd8d: Download complete
Step #2: 3091fac74ac3: Pull complete
Step #2: 32ec8f15f1df: Verifying Checksum
Step #2: 32ec8f15f1df: Download complete
Step #2: 32ec8f15f1df: Pull complete
Step #2: 8a19269d40b4: Pull complete
Step #2: e6425ad9525a: Pull complete
Step #2: 16df2efc4858: Pull complete
Step #2: 2b2d73ab4219: Pull complete
Step #2: 5f2d382df949: Pull complete
Step #2: 5b739d0afd39: Pull complete
Step #2: eb921739ae12: Pull complete
Step #2: 2022ec0c796a: Pull complete
Step #2: 3ee570d976e5: Pull complete
Step #2: 59f7198d9c1c: Pull complete
Step #2: 08501ff593d9: Pull complete
Step #2: a5d32e6825a2: Pull complete
Step #2: 42602390dd8d: Pull complete
Step #2: Digest: sha256:0344289d4121c2024d5b7d8790a8f3a5043b2149c0632928a2d4d9d0b8473f24
Step #2: Status: Downloaded newer image for gcr.io/agones-images/agones-build:e52ce865fb
Finished Step #2
Starting Step #3
Step #3: Already have image: make-docker
Step #3: mkdir -p ~/.kube
Step #3: mkdir -p /workspace/build//.config/gcloud
Step #3: docker run --rm -v /workspace/build//.config/gcloud:/root/.config/gcloud -v ~/.kube:/root/.kube -v /workspace:/go/src/agones.dev/agones -w /go/src/agones.dev/agones  agones-build:e52ce865fb bash -c \
Step #3: 	"/root/gen-lint-exclude.sh && gometalinter --config .exclude.gometalinter.json --deadline 100s -t --skip vendor ./..."
Step #3: docker run --rm -v /workspace/build//.config/gcloud:/root/.config/gcloud -v ~/.kube:/root/.kube -v /workspace:/go/src/agones.dev/agones agones-build:e52ce865fb go test -race agones.dev/agones/...
Step #3: warning: ignoring symlink /go/src/agones.dev/agones/vendor/github.com/prometheus/procfs/fixtures/self
Step #3: ?   	agones.dev/agones	[no test files]
Step #3: ?   	agones.dev/agones/cmd/controller	[no test files]
Step #3: ?   	agones.dev/agones/cmd/sdk-server	[no test files]
Step #3: ?   	agones.dev/agones/examples/simple-udp/client	[no test files]
Step #3: ?   	agones.dev/agones/examples/simple-udp/server	[no test files]
Step #3: ?   	agones.dev/agones/examples/xonotic	[no test files]
Step #3: ?   	agones.dev/agones/pkg	[no test files]
Step #3: ?   	agones.dev/agones/pkg/apis	[no test files]
Step #3: ?   	agones.dev/agones/pkg/apis/stable	[no test files]
Step #3: ok  	agones.dev/agones/pkg/apis/stable/v1alpha1	1.633s
Step #3: ?   	agones.dev/agones/pkg/client	[no test files]
Step #3: ?   	agones.dev/agones/pkg/client/clientset/versioned	[no test files]
Step #3: ?   	agones.dev/agones/pkg/client/clientset/versioned/fake	[no test files]
Step #3: ?   	agones.dev/agones/pkg/client/clientset/versioned/scheme	[no test files]
Step #3: ?   	agones.dev/agones/pkg/client/clientset/versioned/typed/stable/v1alpha1	[no test files]
Step #3: ?   	agones.dev/agones/pkg/client/clientset/versioned/typed/stable/v1alpha1/fake	[no test files]
Step #3: ?   	agones.dev/agones/pkg/client/informers/externalversions	[no test files]
Step #3: ?   	agones.dev/agones/pkg/client/informers/externalversions/internalinterfaces	[no test files]
Step #3: ?   	agones.dev/agones/pkg/client/informers/externalversions/stable	[no test files]
Step #3: ?   	agones.dev/agones/pkg/client/informers/externalversions/stable/v1alpha1	[no test files]
Step #3: ?   	agones.dev/agones/pkg/client/listers/stable/v1alpha1	[no test files]
Step #3: ok  	agones.dev/agones/pkg/fleetallocation	12.545s
Step #3: ok  	agones.dev/agones/pkg/fleets	4.574s
Step #3: ok  	agones.dev/agones/pkg/gameservers	17.419s
Step #3: ok  	agones.dev/agones/pkg/gameserversets	3.444s
Step #3: ?   	agones.dev/agones/pkg/sdk	[no test files]
Step #3: ?   	agones.dev/agones/pkg/testing	[no test files]
Step #3: ?   	agones.dev/agones/pkg/util	[no test files]
Step #3: ok  	agones.dev/agones/pkg/util/crd	4.535s
Step #3: ?   	agones.dev/agones/pkg/util/runtime	[no test files]
Step #3: ?   	agones.dev/agones/pkg/util/signals	[no test files]
Step #3: ok  	agones.dev/agones/pkg/util/webhooks	1.626s
Step #3: ok  	agones.dev/agones/pkg/util/workerqueue	3.758s
Step #3: ok  	agones.dev/agones/sdks/go	1.015s
Step #3: mkdir -p /tmp/agones-install
Step #3: cp /workspace/install/yaml/install.yaml /tmp/agones-install/install.yaml
Step #3: sort /tmp/agones-install/install.yaml > /tmp/agones-install/install.yaml.sorted
Step #3: /usr/bin/make gen-install
Step #3: make[1]: Entering directory '/workspace/build'
Step #3: mkdir -p ~/.kube
Step #3: mkdir -p /workspace/build//.config/gcloud
Step #3: docker run --rm -v /workspace/build//.config/gcloud:/root/.config/gcloud -v ~/.kube:/root/.kube -v /workspace:/go/src/agones.dev/agones  agones-build:e52ce865fb bash -c \
Step #3: 	'helm template --name=agones-manual /go/src/agones.dev/agones/install/helm/agones > /go/src/agones.dev/agones/install/yaml/install.yaml'
Step #3: make[1]: Leaving directory '/workspace/build'
Step #3: sort /workspace/install/yaml/install.yaml > /tmp/agones-install/install.current.yaml.sorted
Step #3: diff /tmp/agones-install/install.yaml.sorted /tmp/agones-install/install.current.yaml.sorted
Step #3: 180a181,182
Step #3: >                     - Recreate
Step #3: >                     - RollingUpdate
Step #3: 202a205
Step #3: >                   enum:
Step #3: 232a236
Step #3: >                 type:
Step #3: 260a265
Step #3: >               properties:
Step #3: 295a301
Step #3: >             strategy:
Step #3: 301a308
Step #3: >           - "fleets"
Step #3: Makefile:110: recipe for target 'test-install-yaml' failed
Step #3: make: *** [test-install-yaml] Error 1
Finished Step #3
ERROR
ERROR: build step 3 "make-docker" failed: exit status 2

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 97f15f10-ed60-492d-b963-057fe19878ef

Build Logs
starting build "97f15f10-ed60-492d-b963-057fe19878ef"

FETCHSOURCE
Initialized empty Git repository in /workspace/.git/
From https://source.developers.google.com/p/agones-images/r/agones
 * branch            a3eec8bf4e68c8b19311ae2de0fedeb4a4400db5 -> FETCH_HEAD
HEAD is now at a3eec8b Fleet update strategy: Replace
BUILD
Starting Step #0
Step #0: Already have image (with digest): ubuntu
Finished Step #0
Starting Step #1
Step #1: Already have image (with digest): gcr.io/cloud-builders/docker
Step #1: Sending build context to Docker daemon  131.1MB

Step #1: Step 1/3 : FROM gcr.io/cloud-builders/docker
Step #1:  ---> 2583351a5f17
Step #1: Step 2/3 : RUN apt-get install make
Step #1:  ---> Running in 3cb5291f79d1
Step #1: Reading package lists...
Step #1: Building dependency tree...
Step #1: Reading state information...
Step #1: Suggested packages:
Step #1:   make-doc
Step #1: The following NEW packages will be installed:
Step #1:   make
Step #1: 0 upgraded, 1 newly installed, 0 to remove and 33 not upgraded.
Step #1: Need to get 151 kB of archives.
Step #1: After this operation, 365 kB of additional disk space will be used.
Step #1: Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 make amd64 4.1-6 [151 kB]
Step #1: �[91mdebconf: unable to initialize frontend: Dialog
Step #1: �[0m�[91mdebconf: (TERM is not set, so the dialog frontend is not usable.)
Step #1: �[0m�[91mdebconf: falling back to frontend: Readline
Step #1: �[0m�[91mdebconf: unable to initialize frontend: Readline
Step #1: �[0m�[91mdebconf: (This frontend requires a controlling tty.)
Step #1: �[0m�[91mdebconf: falling back to frontend: Teletype
Step #1: �[0m�[91mdpkg-preconfigure: unable to re-open stdin: 
Step #1: �[0mFetched 151 kB in 0s (253 kB/s)
Step #1: Selecting previously unselected package make.
Step #1: (Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 11239 files and directories currently installed.)
Step #1: Preparing to unpack .../archives/make_4.1-6_amd64.deb ...
Step #1: Unpacking make (4.1-6) ...
Step #1: Setting up make (4.1-6) ...
Step #1: Removing intermediate container 3cb5291f79d1
Step #1:  ---> a0cb005a9697
Step #1: Step 3/3 : ENTRYPOINT ["/usr/bin/make"]
Step #1:  ---> Running in a3083e3f4c83
Step #1: Removing intermediate container a3083e3f4c83
Step #1:  ---> 0d3da18554d8
Step #1: Successfully built 0d3da18554d8
Step #1: Successfully tagged make-docker:latest
Finished Step #1
Starting Step #2
Step #2: Already have image: make-docker
Step #2: docker pull gcr.io/agones-images/agones-build:e52ce865fb && docker tag gcr.io/agones-images/agones-build:e52ce865fb agones-build:e52ce865fb
Step #2: e52ce865fb: Pulling from agones-images/agones-build
Step #2: c73ab1c6897b: Pulling fs layer
Step #2: 3091fac74ac3: Pulling fs layer
Step #2: 32ec8f15f1df: Pulling fs layer
Step #2: 8a19269d40b4: Pulling fs layer
Step #2: e6425ad9525a: Pulling fs layer
Step #2: 16df2efc4858: Pulling fs layer
Step #2: 2b2d73ab4219: Pulling fs layer
Step #2: 5f2d382df949: Pulling fs layer
Step #2: 5b739d0afd39: Pulling fs layer
Step #2: eb921739ae12: Pulling fs layer
Step #2: 2022ec0c796a: Pulling fs layer
Step #2: 3ee570d976e5: Pulling fs layer
Step #2: 59f7198d9c1c: Pulling fs layer
Step #2: 08501ff593d9: Pulling fs layer
Step #2: a5d32e6825a2: Pulling fs layer
Step #2: 42602390dd8d: Pulling fs layer
Step #2: 8a19269d40b4: Waiting
Step #2: e6425ad9525a: Waiting
Step #2: 16df2efc4858: Waiting
Step #2: 2b2d73ab4219: Waiting
Step #2: 5f2d382df949: Waiting
Step #2: 5b739d0afd39: Waiting
Step #2: eb921739ae12: Waiting
Step #2: 2022ec0c796a: Waiting
Step #2: 3ee570d976e5: Waiting
Step #2: 59f7198d9c1c: Waiting
Step #2: 08501ff593d9: Waiting
Step #2: a5d32e6825a2: Waiting
Step #2: 42602390dd8d: Waiting
Step #2: c73ab1c6897b: Verifying Checksum
Step #2: c73ab1c6897b: Download complete
Step #2: 8a19269d40b4: Verifying Checksum
Step #2: 8a19269d40b4: Download complete
Step #2: 3091fac74ac3: Verifying Checksum
Step #2: 3091fac74ac3: Download complete
Step #2: e6425ad9525a: Verifying Checksum
Step #2: e6425ad9525a: Download complete
Step #2: 16df2efc4858: Verifying Checksum
Step #2: 16df2efc4858: Download complete
Step #2: 5f2d382df949: Verifying Checksum
Step #2: 5f2d382df949: Download complete
Step #2: 5b739d0afd39: Verifying Checksum
Step #2: 5b739d0afd39: Download complete
Step #2: 2b2d73ab4219: Verifying Checksum
Step #2: 2b2d73ab4219: Download complete
Step #2: eb921739ae12: Verifying Checksum
Step #2: eb921739ae12: Download complete
Step #2: 3ee570d976e5: Verifying Checksum
Step #2: 3ee570d976e5: Download complete
Step #2: 59f7198d9c1c: Verifying Checksum
Step #2: 59f7198d9c1c: Download complete
Step #2: 08501ff593d9: Verifying Checksum
Step #2: 08501ff593d9: Download complete
Step #2: a5d32e6825a2: Verifying Checksum
Step #2: a5d32e6825a2: Download complete
Step #2: 2022ec0c796a: Verifying Checksum
Step #2: 2022ec0c796a: Download complete
Step #2: 42602390dd8d: Verifying Checksum
Step #2: 42602390dd8d: Download complete
Step #2: 32ec8f15f1df: Verifying Checksum
Step #2: 32ec8f15f1df: Download complete
Step #2: c73ab1c6897b: Pull complete
Step #2: 3091fac74ac3: Pull complete
Step #2: 32ec8f15f1df: Pull complete
Step #2: 8a19269d40b4: Pull complete
Step #2: e6425ad9525a: Pull complete
Step #2: 16df2efc4858: Pull complete
Step #2: 2b2d73ab4219: Pull complete
Step #2: 5f2d382df949: Pull complete
Step #2: 5b739d0afd39: Pull complete
Step #2: eb921739ae12: Pull complete
Step #2: 2022ec0c796a: Pull complete
Step #2: 3ee570d976e5: Pull complete
Step #2: 59f7198d9c1c: Pull complete
Step #2: 08501ff593d9: Pull complete
Step #2: a5d32e6825a2: Pull complete
Step #2: 42602390dd8d: Pull complete
Step #2: Digest: sha256:0344289d4121c2024d5b7d8790a8f3a5043b2149c0632928a2d4d9d0b8473f24
Step #2: Status: Downloaded newer image for gcr.io/agones-images/agones-build:e52ce865fb
Finished Step #2
Starting Step #3
Step #3: Already have image: make-docker
Step #3: mkdir -p ~/.kube
Step #3: mkdir -p /workspace/build//.config/gcloud
Step #3: docker run --rm -v /workspace/build//.config/gcloud:/root/.config/gcloud -v ~/.kube:/root/.kube -v /workspace:/go/src/agones.dev/agones -w /go/src/agones.dev/agones  agones-build:e52ce865fb bash -c \
Step #3: 	"/root/gen-lint-exclude.sh && gometalinter --config .exclude.gometalinter.json --deadline 100s -t --skip vendor ./..."
Step #3: docker run --rm -v /workspace/build//.config/gcloud:/root/.config/gcloud -v ~/.kube:/root/.kube -v /workspace:/go/src/agones.dev/agones agones-build:e52ce865fb go test -race agones.dev/agones/...
Step #3: warning: ignoring symlink /go/src/agones.dev/agones/vendor/github.com/prometheus/procfs/fixtures/self
Step #3: ?   	agones.dev/agones	[no test files]
Step #3: ?   	agones.dev/agones/cmd/controller	[no test files]
Step #3: ?   	agones.dev/agones/cmd/sdk-server	[no test files]
Step #3: ?   	agones.dev/agones/examples/simple-udp/client	[no test files]
Step #3: ?   	agones.dev/agones/examples/simple-udp/server	[no test files]
Step #3: ?   	agones.dev/agones/examples/xonotic	[no test files]
Step #3: ?   	agones.dev/agones/pkg	[no test files]
Step #3: ?   	agones.dev/agones/pkg/apis	[no test files]
Step #3: ?   	agones.dev/agones/pkg/apis/stable	[no test files]
Step #3: ok  	agones.dev/agones/pkg/apis/stable/v1alpha1	1.582s
Step #3: ?   	agones.dev/agones/pkg/client	[no test files]
Step #3: ?   	agones.dev/agones/pkg/client/clientset/versioned	[no test files]
Step #3: ?   	agones.dev/agones/pkg/client/clientset/versioned/fake	[no test files]
Step #3: ?   	agones.dev/agones/pkg/client/clientset/versioned/scheme	[no test files]
Step #3: ?   	agones.dev/agones/pkg/client/clientset/versioned/typed/stable/v1alpha1	[no test files]
Step #3: ?   	agones.dev/agones/pkg/client/clientset/versioned/typed/stable/v1alpha1/fake	[no test files]
Step #3: ?   	agones.dev/agones/pkg/client/informers/externalversions	[no test files]
Step #3: ?   	agones.dev/agones/pkg/client/informers/externalversions/internalinterfaces	[no test files]
Step #3: ?   	agones.dev/agones/pkg/client/informers/externalversions/stable	[no test files]
Step #3: ?   	agones.dev/agones/pkg/client/informers/externalversions/stable/v1alpha1	[no test files]
Step #3: ?   	agones.dev/agones/pkg/client/listers/stable/v1alpha1	[no test files]
Step #3: ok  	agones.dev/agones/pkg/fleetallocation	12.572s
Step #3: ok  	agones.dev/agones/pkg/fleets	4.587s
Step #3: ok  	agones.dev/agones/pkg/gameservers	16.446s
Step #3: ok  	agones.dev/agones/pkg/gameserversets	3.483s
Step #3: ?   	agones.dev/agones/pkg/sdk	[no test files]
Step #3: ?   	agones.dev/agones/pkg/testing	[no test files]
Step #3: ?   	agones.dev/agones/pkg/util	[no test files]
Step #3: ok  	agones.dev/agones/pkg/util/crd	4.547s
Step #3: ?   	agones.dev/agones/pkg/util/runtime	[no test files]
Step #3: ?   	agones.dev/agones/pkg/util/signals	[no test files]
Step #3: ok  	agones.dev/agones/pkg/util/webhooks	1.627s
Step #3: ok  	agones.dev/agones/pkg/util/workerqueue	3.769s
Step #3: ok  	agones.dev/agones/sdks/go	1.019s
Step #3: mkdir -p /tmp/agones-install
Step #3: cp /workspace/install/yaml/install.yaml /tmp/agones-install/install.yaml
Step #3: sort /tmp/agones-install/install.yaml > /tmp/agones-install/install.yaml.sorted
Step #3: /usr/bin/make gen-install
Step #3: make[1]: Entering directory '/workspace/build'
Step #3: mkdir -p ~/.kube
Step #3: mkdir -p /workspace/build//.config/gcloud
Step #3: docker run --rm -v /workspace/build//.config/gcloud:/root/.config/gcloud -v ~/.kube:/root/.kube -v /workspace:/go/src/agones.dev/agones  agones-build:e52ce865fb bash -c \
Step #3: 	'helm template --name=agones-manual /go/src/agones.dev/agones/install/helm/agones > /go/src/agones.dev/agones/install/yaml/install.yaml'
Step #3: make[1]: Leaving directory '/workspace/build'
Step #3: sort /workspace/install/yaml/install.yaml > /tmp/agones-install/install.current.yaml.sorted
Step #3: diff /tmp/agones-install/install.yaml.sorted /tmp/agones-install/install.current.yaml.sorted
Step #3: 180a181,182
Step #3: >                     - Recreate
Step #3: >                     - RollingUpdate
Step #3: 202a205
Step #3: >                   enum:
Step #3: 232a236
Step #3: >                 type:
Step #3: 260a265
Step #3: >               properties:
Step #3: 295a301
Step #3: >             strategy:
Step #3: 301a308
Step #3: >           - "fleets"
Step #3: Makefile:110: recipe for target 'test-install-yaml' failed
Step #3: make: *** [test-install-yaml] Error 1
Finished Step #3
ERROR
ERROR: build step 3 "make-docker" failed: exit status 2

@markmandel markmandel force-pushed the feature/fleet-replace branch 2 times, most recently from e463233 to 980ad2d Compare May 8, 2018 23:59
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 7964e4de-35f8-4011-a62c-aa15b13bddda

The following development artifacts have been built, and will exist for the next 30 days:

We can also change the configuration of the `GameServer` of the running `Fleet`, and have the changes
roll out, without interrupting the currently `Allocated` `GameServers`.

Let's take this for a spin! Run `kubectl edit fleet simple-udp` and set the `repicas` field to back to `5`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: replicas field back to 5

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -173,39 +224,102 @@ func (c *Controller) syncFleet(key string) error {
return err
}

var activeGsSet *stablev1alpha1.GameServerSet
activeGsSet, rest := c.filterGameServerSetByActive(fleet, list)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to make sure I understand this piece of code. This method returns the active gameserver set a a list of previous one. We then go on to set the replicas count to 0 on those and then deleting them. What happens if one of those replicas was allocated?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent question - any previously Allocated GameServers that part of the "inactive" GameServerSet are left alone, and the GameServerSet will stay alive until the Allocated GameServer shuts itself down or is otherwise terminated.

For reference you can see the code for scaling down GameServerSet here, and how it ignores Allocated GameServers.

For a live demo, you can actually see it in action on this twitch video (only live for 13 more days, will push to YouTube at some point today).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an interesting note - this is why deleteEmptyGameServerSets (code) only deletes a GameServerSet when the gsSet.Status.Replicas == 0 - because this will never be 0 when there are still Allocated GameServers.

@markmandel markmandel force-pushed the feature/fleet-replace branch 2 times, most recently from 0324093 to 833eb56 Compare May 9, 2018 15:44
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 6ab82750-e6a4-46d5-b2b3-ab6f9a1c4392

The following development artifacts have been built, and will exist for the next 30 days:

@markmandel markmandel mentioned this pull request May 9, 2018
5 tasks
@markmandel
Copy link
Member Author

@enocom see anything that needs improvement in my Go code? 😄

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 5ba15b9c-2f8f-47a7-808f-6455efac4c7e

The following development artifacts have been built, and will exist for the next 30 days:

if err != nil {
return errors.Wrapf(err, "error creating gameserverset for fleet %s", fleet.ObjectMeta.Name)
}

c.recorder.Eventf(fleet, corev1.EventTypeNormal, "CreatingGameServerSet",
"Created GameServerSet %s", activeGsSet.ObjectMeta.Name)
"Created GameServerSet %s", gsSet.ObjectMeta.Name)
} else if replicas != gsSet.Spec.Replicas {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than use an else if statement here, you could add a return nil to the if block above, and a return nil to the else if block. That way the control flow is easier to follow and more idiomatic.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. That should be better. Definitely seems more readable 👍

When the template for a Fleet is edited,
a deployment strategy can be defined. At the
moment, this is just the `Replace` strategy, which
terminates all current non-allocated GameServers
and immeadiately starts up new GameServers to replace
them.

Includes documentation as well.
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 7896b68f-b00f-47f0-9620-fe7a98f3c73f

The following development artifacts have been built, and will exist for the next 30 days:

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 64432286-bef7-4463-9b9c-8554ca97fb43

The following development artifacts have been built, and will exist for the next 30 days:

@markmandel
Copy link
Member Author

@enocom @EricFortin gentle bump 😄

Please let me know if there is anything else to change, otherwise, would love an approval 😊

Thanks!

Copy link
Contributor

@enocom enocom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@enocom enocom merged commit 874081d into googleforgames:master May 14, 2018
@markmandel markmandel deleted the feature/fleet-replace branch May 14, 2018 18:31
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 1cdf188e-ff09-476e-bf7b-73cec6ad2193

The following development artifacts have been built, and will exist for the next 30 days:

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 5eff556d-6af2-4565-a768-0e8845b7d20c

Build Logs
starting build "5eff556d-6af2-4565-a768-0e8845b7d20c"

FETCHSOURCE
Initialized empty Git repository in /workspace/.git/
From https://source.developers.google.com/p/agones-images/r/agones
 * branch            5fa785c1c003849fd7dbeded187d013010726600 -> FETCH_HEAD
HEAD is now at 5fa785c Fleet update strategy: Replace
BUILD
Starting Step #0
Step #0: Already have image (with digest): ubuntu
Finished Step #0
Starting Step #1
Step #1: Already have image (with digest): gcr.io/cloud-builders/docker
Step #1: Sending build context to Docker daemon  131.1MB

Step #1: Step 1/3 : FROM gcr.io/cloud-builders/docker
Step #1:  ---> 9f8e1da170b2
Step #1: Step 2/3 : RUN apt-get install make
Step #1:  ---> Running in eaf803f8400e
Step #1: Reading package lists...
Step #1: Building dependency tree...
Step #1: Reading state information...
Step #1: Suggested packages:
Step #1:   make-doc
Step #1: The following NEW packages will be installed:
Step #1:   make
Step #1: 0 upgraded, 1 newly installed, 0 to remove and 31 not upgraded.
Step #1: Need to get 151 kB of archives.
Step #1: After this operation, 365 kB of additional disk space will be used.
Step #1: Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 make amd64 4.1-6 [151 kB]
Step #1: Fetched 151 kB in 0s (252 kB/s)
Step #1: Selecting previously unselected package make.
Step #1: (Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 11239 files and directories currently installed.)
Step #1: Preparing to unpack .../archives/make_4.1-6_amd64.deb ...
Step #1: Unpacking make (4.1-6) ...
Step #1: Setting up make (4.1-6) ...
Step #1: Removing intermediate container eaf803f8400e
Step #1:  ---> e282088f96fc
Step #1: Step 3/3 : ENTRYPOINT ["/usr/bin/make"]
Step #1:  ---> Running in d99dc95a14bc
Step #1: Removing intermediate container d99dc95a14bc
Step #1:  ---> 43b10737397c
Step #1: Successfully built 43b10737397c
Step #1: Successfully tagged make-docker:latest
Finished Step #1
Starting Step #2
Step #2: Already have image: make-docker
Step #2: docker pull gcr.io/agones-images/agones-build:e52ce865fb && docker tag gcr.io/agones-images/agones-build:e52ce865fb agones-build:e52ce865fb
Step #2: e52ce865fb: Pulling from agones-images/agones-build
Step #2: c73ab1c6897b: Pulling fs layer
Step #2: 3091fac74ac3: Pulling fs layer
Step #2: 32ec8f15f1df: Pulling fs layer
Step #2: 8a19269d40b4: Pulling fs layer
Step #2: e6425ad9525a: Pulling fs layer
Step #2: 16df2efc4858: Pulling fs layer
Step #2: 2b2d73ab4219: Pulling fs layer
Step #2: 5f2d382df949: Pulling fs layer
Step #2: 5b739d0afd39: Pulling fs layer
Step #2: eb921739ae12: Pulling fs layer
Step #2: 2022ec0c796a: Pulling fs layer
Step #2: 3ee570d976e5: Pulling fs layer
Step #2: 59f7198d9c1c: Pulling fs layer
Step #2: 08501ff593d9: Pulling fs layer
Step #2: a5d32e6825a2: Pulling fs layer
Step #2: 42602390dd8d: Pulling fs layer
Step #2: 8a19269d40b4: Waiting
Step #2: e6425ad9525a: Waiting
Step #2: 16df2efc4858: Waiting
Step #2: 2b2d73ab4219: Waiting
Step #2: 5f2d382df949: Waiting
Step #2: 5b739d0afd39: Waiting
Step #2: eb921739ae12: Waiting
Step #2: 2022ec0c796a: Waiting
Step #2: 3ee570d976e5: Waiting
Step #2: 59f7198d9c1c: Waiting
Step #2: 08501ff593d9: Waiting
Step #2: a5d32e6825a2: Waiting
Step #2: 42602390dd8d: Waiting
Step #2: c73ab1c6897b: Verifying Checksum
Step #2: c73ab1c6897b: Download complete
Step #2: 8a19269d40b4: Verifying Checksum
Step #2: 8a19269d40b4: Download complete
Step #2: c73ab1c6897b: Pull complete
Step #2: e6425ad9525a: Verifying Checksum
Step #2: e6425ad9525a: Download complete
Step #2: 3091fac74ac3: Verifying Checksum
Step #2: 3091fac74ac3: Download complete
Step #2: 16df2efc4858: Verifying Checksum
Step #2: 16df2efc4858: Download complete
Step #2: 5f2d382df949: Verifying Checksum
Step #2: 5f2d382df949: Download complete
Step #2: 2b2d73ab4219: Verifying Checksum
Step #2: 2b2d73ab4219: Download complete
Step #2: 5b739d0afd39: Verifying Checksum
Step #2: 5b739d0afd39: Download complete
Step #2: eb921739ae12: Verifying Checksum
Step #2: eb921739ae12: Download complete
Step #2: 3091fac74ac3: Pull complete
Step #2: 3ee570d976e5: Verifying Checksum
Step #2: 3ee570d976e5: Download complete
Step #2: 59f7198d9c1c: Verifying Checksum
Step #2: 59f7198d9c1c: Download complete
Step #2: 08501ff593d9: Verifying Checksum
Step #2: 08501ff593d9: Download complete
Step #2: 2022ec0c796a: Verifying Checksum
Step #2: 2022ec0c796a: Download complete
Step #2: a5d32e6825a2: Verifying Checksum
Step #2: a5d32e6825a2: Download complete
Step #2: 42602390dd8d: Verifying Checksum
Step #2: 42602390dd8d: Download complete
Step #2: 32ec8f15f1df: Verifying Checksum
Step #2: 32ec8f15f1df: Download complete
Step #2: 32ec8f15f1df: Pull complete
Step #2: 8a19269d40b4: Pull complete
Step #2: e6425ad9525a: Pull complete
Step #2: 16df2efc4858: Pull complete
Step #2: 2b2d73ab4219: Pull complete
Step #2: 5f2d382df949: Pull complete
Step #2: 5b739d0afd39: Pull complete
Step #2: eb921739ae12: Pull complete
Step #2: 2022ec0c796a: Pull complete
Step #2: 3ee570d976e5: Pull complete
Step #2: 59f7198d9c1c: Pull complete
Step #2: 08501ff593d9: Pull complete
Step #2: a5d32e6825a2: Pull complete
Step #2: 42602390dd8d: Pull complete
Step #2: Digest: sha256:0344289d4121c2024d5b7d8790a8f3a5043b2149c0632928a2d4d9d0b8473f24
Step #2: Status: Downloaded newer image for gcr.io/agones-images/agones-build:e52ce865fb
Finished Step #2
Starting Step #3
Step #3: Already have image: make-docker
Step #3: mkdir -p ~/.kube
Step #3: mkdir -p /workspace/build//.config/gcloud
Step #3: docker run --rm -v /workspace/build//.config/gcloud:/root/.config/gcloud -v ~/.kube:/root/.kube -v /workspace:/go/src/agones.dev/agones -w /go/src/agones.dev/agones  agones-build:e52ce865fb bash -c \
Step #3: 	"/root/gen-lint-exclude.sh && gometalinter --config .exclude.gometalinter.json --deadline 100s -t --skip vendor ./..."
Step #3: WARNING: deadline exceeded by linter megacheck (try increasing --deadline)
Step #3: WARNING: deadline exceeded by linter vetshadow (try increasing --deadline)
Step #3: make: *** [lint] Error 2
Step #3: Makefile:136: recipe for target 'lint' failed
Finished Step #3
ERROR
ERROR: build step 3 "make-docker" failed: exit status 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Documentation for Agones kind/feature New features for Agones
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants