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

Prep for continuous Docker validation test #26813

Merged
merged 1 commit into from
Jun 18, 2016

Conversation

wonderfly
Copy link
Contributor

Add a test config variable to specify desired Docker version to run on GCI.

We want to continuously validate Docker releases (#25215), on GCI. This change
adds a new test config variable, KUBE_GCI_DOCKER_VERSION, through which we can
specify which version of Docker we want to run on the master and nodes. This
change also patches the Jenkins e2e-runner with the ability to fetch the latest
Docker (pre)release, and sets the aforementioned variable accordingly.

Tested on my local Jenkins instance that was able to start a cluster with the latest Docker version (different from installed version) running on both master and nodes.

@dchen1107 Can you review?

cc/ @andyzheng0831 for changes in cluster/gce/gci/helper.sh, and @ixdy @spxtr for changes to the Jenkins e2e-runner

cc/ @kubernetes/goog-image

We want to continuously validate Docker releases (kubernetes#25215), on GCI. This change
adds a new test config variable, `KUBE_GCI_DOCKER_VERSION`, through which we can
specify which version of Docker we want to run on the master and nodes. This
change also patches the Jenkins e2e-runner with the ability to fetch the latest
Docker (pre)release, and sets the aforementioned variable accordingly.
@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note-label-needed labels Jun 3, 2016
@wonderfly wonderfly added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels Jun 3, 2016
@andyzheng0831
Copy link

Do we already make GCI image able to handle metadata key gci-docker-version?

@wonderfly
Copy link
Contributor Author

wonderfly commented Jun 3, 2016

GCI preview images yes. Not in the official releases yet.

@andyzheng0831
Copy link

LGTM, leave it to other reviewers for further check

@wonderfly
Copy link
Contributor Author

@dchen1107 Let me know if you want somebody else on your team (Lantao/Tim?) to review.

# Typical Docker release versions are like v1.11.2-rc1, v1.11.2, and etc.
local -r version_re='.*\"tag_name\":[[:space:]]+\"v([0-9\.r|c-]+)\",.*'
local -r latest_release="$(curl -fsSL --retry 3 https://api.github.com/repos/docker/docker/releases/latest)"
if [[ "${latest_release}" =~ ${version_re} ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: quotes "${version_re}"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have been following the bash 3.2 guide on using regular expression by not quoting them:

In fact, quoting in this context is not advisable as it may cause regex evaluation to fail.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, okay. Good :)

@spxtr
Copy link
Contributor

spxtr commented Jun 6, 2016

e2e-runner.sh looks good.

@wonderfly
Copy link
Contributor Author

@spxtr Thanks for the review.

@dchen1107
Copy link
Member

LGTM

@dchen1107 dchen1107 added the sig/node Categorizes an issue or PR as relevant to SIG Node. label Jun 8, 2016
@dchen1107 dchen1107 added this to the v1.3 milestone Jun 8, 2016
@dchen1107 dchen1107 added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 8, 2016
@wonderfly
Copy link
Contributor Author

@k8s-bot test this issue #27276

@wonderfly
Copy link
Contributor Author

@k8s-bot test this issue #27297

@k8s-bot
Copy link

k8s-bot commented Jun 18, 2016

GCE e2e build/test passed for commit a3d712c.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Jun 18, 2016

GCE e2e build/test passed for commit a3d712c.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 48b255d into kubernetes:master Jun 18, 2016
@dchen1107
Copy link
Member

Finally this is merged. :-)

@wonderfly wonderfly deleted the choose_docker_version branch June 20, 2016 16:45
@girishkalele
Copy link

Encountering error during kube-up cluster/gce/gci/helper.sh: line 34: GCI_DOCKER_VERSION: unbound variable with latest master - is there anything I need to set in my environment ?

kubernetes-master-https  default  0.0.0.0/0   tcp:443            kubernetes-master
Created [https://www.googleapis.com/compute/v1/projects/google.com:gkalele-netperf/regions/us-central1/addresses/kubernetes-master-ip].
Generating certs for alternate-names: IP:104.155.132.158,IP:10.0.0.1,DNS:kubernetes,DNS:kubernetes.default,DNS:kubernetes.default.svc,DNS:kubernetes.default.svc.cluster.local,DNS:kubernetes-master
+++ Logging using Fluentd to gcp
./../cluster/../cluster/gce/../../cluster/gce/../../cluster/../cluster/gce/gci/helper.sh: line 34: GCI_DOCKER_VERSION: unbound variable
Created [https://www.googleapis.com/compute/v1/projects/google.com:gkalele-netperf/global/firewalls/kubernetes-minion-all].
NAME                   NETWORK  SRC_RANGES     RULES                     SRC_TAGS  TARGET_TAGS
kubernetes-minion-all  default  10.244.0.0/14  tcp,udp,icmp,esp,ah,sctp            kubernetes-minion
Some commands failed.

@girishkalele
Copy link

@wonderfly

Can you suggest a workaround for this ? I am unable to kube-up today - the minions come up but the gcloud command to create the master fails.

@wonderfly
Copy link
Contributor Author

Hmm... How come the e2e tests were able to run just fine. They also used kube-up and sourced the same helper.sh. Looking.

@girishkalele A quick workaround for you is to set KUBE_GCI_DOCKER_VERSION to 1.11.2 or something.

@girishkalele
Copy link

@wonderfly

This workaround worked -

export GCI_DOCKER_VERSION=1.11.2

@wonderfly
Copy link
Contributor Author

I am curious how you encountered this though. Can you share how I can reproduce?

@girishkalele
Copy link

I just do a kube-up.sh.

My environment is very clean, it has no variables matching KUBE or GCI.

@wonderfly
Copy link
Contributor Author

Yeah, looks like I needed to add that var def to gce/config-default.sh too. e2e tests only used config-test.sh so that explains why it didn't catch this. Preparing a fix.

wonderfly added a commit to wonderfly/kubernetes that referenced this pull request Jun 20, 2016
fixes kubernetes#26813

This env var is only set in `config-test.sh` and trying to evaluate it with
`nounset` set will end up with an "unbound variable" error.
@girishkalele
Copy link

@wonderfly
Thanks for the quick fix.

k8s-github-robot pushed a commit that referenced this pull request Jun 20, 2016
Automatic merge from submit-queue

Make GCI_DOCKER_VERSION optional

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()

fixes #26813

This env var is only set in `config-test.sh` and trying to evaluate it with
`nounset` set will end up with an "unbound variable" error.

@girishkalele @dchen1107 This is a XS fix. Can you review?
k8s-github-robot pushed a commit that referenced this pull request Jul 12, 2016
Automatic merge from submit-queue

Node E2E: Prep for continuous Docker validation node e2e test

Based on #28516, for #25215.

#26813 added support to run e2e test on gci preview image and newest docker version.
This PR added the same support to node e2e test.

The main dependencies of node e2e test are `docker`, `kubelet`, `etcd` and `apiserver`.
Currently, node e2e test builds `kubelet` and `apiserver` locally, and copies them into `/tmp` directory in VM instance. GCI also has built-in `docker`. So the only dependency missing is `etcd`.

This PR injected a simple cloud-init script when creating instance to install `etcd` during node startup.

@andyzheng0831 for the cloud init script.
@wonderfly for the gci instance setup.
@pwittrock for the node e2e test change.

/cc @dchen1107 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/node Categorizes an issue or PR as relevant to SIG Node. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants