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

Install etcd in the kubekins-test image #522

Closed
wants to merge 1 commit into from

Conversation

ixdy
Copy link
Member

@ixdy ixdy commented Sep 6, 2016

Address some complaints from kubernetes/kubernetes#31915 (though it doesn't help a developer's local workflow).

Also a step towards fixing the "downloading etcd" flake.

Next steps:
a) push a new kubekins-test image and use it
b) update all of the Jenkins scripts to use etcd from the PATH rather than downloading it

We probably also need to document somewhere that changes in kubernetes/kubernetes to the default etcd version need to be included in this repo too.

cc @david-mcmahon @kubernetes/test-infra-maintainers


This change is Reviewable

@rmmh
Copy link
Contributor

rmmh commented Sep 6, 2016

I'm not a big fan of this. The S3 download is flaky. It could be replaced with a gsutil cat instead, and be more reliable (since gsutil includes retries).

How would a PR that upgrades etcd be tested?

@ixdy
Copy link
Member Author

ixdy commented Sep 6, 2016

IMO downloading unchanging dependencies at runtime is an anti-pattern.

New versions would likely be tested locally. We also have facilities to create a new kubekins-test image and test it before making it default.

@lavalamp
Copy link
Member

lavalamp commented Sep 6, 2016

I still think that having the test code go through a proxy, and caching all downloads there, is a better way to go. That way we wouldn't have to push a new test image every time someone changes the etcd version, and we get this behavior automatically for all dependencies.

@ixdy
Copy link
Member Author

ixdy commented Sep 6, 2016

I don't have the bandwidth to do something like that right now. If that's the direction we want to go, someone else will need to own it.

etcd downloads have been rather flaky of late, see kubernetes/kubernetes#31191 (comment) and kubernetes/kubernetes#31492 (comment).

@rmmh
Copy link
Contributor

rmmh commented Sep 7, 2016

I'll have a go at it.

@lavalamp
Copy link
Member

lavalamp commented Sep 7, 2016

It may make sense to check with @fejta, if he's in. I'm just worried that
we're putting too much burden on the users of our testing infrastructure.

On Tue, Sep 6, 2016 at 5:04 PM, Ryan Hitchman notifications@github.com
wrote:

I'll have a go at it.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#522 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAnglvAp8t6QT106O7RyXhdDRXJwl-_xks5qnf99gaJpZM4J2WxO
.

@spxtr
Copy link
Contributor

spxtr commented Sep 7, 2016

I prefer this to caching on GCS. Even if the S3 download is flaky it only needs to happen once every time we update etcd in the image. It's pretty easy to build and push a new kubekins-test image with a new etcd version.

@ixdy
Copy link
Member Author

ixdy commented Sep 8, 2016

Prior art: the cross-build image has included etcd since inception, I guess cause we run integration tests inside it?

(We shouldn't be running integration tests inside the cross-build image. ugh.)

@fejta
Copy link
Contributor

fejta commented Sep 9, 2016

I see installing etcd as a prerequisite for testing. I do not see installing etcd as something we are intentionally testing.

I would prefer to have etcd (and all other prerequisites) already installed and configured in the image used for integration testing.

On the other hand I would strongly prefer that the image used for unit and e2e testing does not have any references to etcd, such that people do mistakenly do integration testing in the wrong location... However since my understanding is that a) many unit tests use etcd and b) we only have a single image used for all types of testing I am happy to leave this second part for a future exercise.

@@ -43,6 +43,13 @@ RUN apt-get -o Acquire::Check-Valid-Until=false update && apt-get install -y \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

# Download and symlink etcd. We need this for verification and integration tests.
RUN export ETCD_VERSION=v3.0.4; \
Copy link
Contributor

Choose a reason for hiding this comment

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

This is super cool! I love that changing the ETCD version requires a) a PR to update this line and b) pushing a new image.

On the other hand, is there any chance this can more closely follow the instructions at https://github.com/kubernetes/kubernetes/blob/master/docs/devel/testing.md#install-etcd-dependency? It is not clear that hack/install-etcd.sh does the following... in fact this says it installs it into ./third_party/etcd.

Copy link
Contributor

Choose a reason for hiding this comment

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

Modifying just the hack/install-etcd.sh script keeps the weirdness
localized. If we want to have etcd always available in $PATH and not use
hack/install-etcd.sh at all in our CI, that's fine too.

On Thu, Sep 8, 2016 at 9:01 PM, Erick Fejta notifications@github.com
wrote:

In jenkins/test-image/Dockerfile
#522 (comment):

@@ -43,6 +43,13 @@ RUN apt-get -o Acquire::Check-Valid-Until=false update && apt-get install -y
--no-install-recommends
&& rm -rf /var/lib/apt/lists/*

+# Download and symlink etcd. We need this for verification and integration tests.
+RUN export ETCD_VERSION=v3.0.4; \

This is super cool! I love that changing the ETCD version requires a) a PR
to update this line and b) pushing a new image.

On the other hand, is there any chance this can more closely follow the
instructions at https://github.com/kubernetes/kubernetes/blob/master/docs/
devel/testing.md#install-etcd-dependency? It is not clear that
hack/install-etcd.sh does the following... in fact this says it installs it
into ./third_party/etcd.


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kubernetes/test-infra/pull/522/files/ab44d468ccc40a462a03620ca092a2511df5b6b8#r78125897,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAM7nEzdUXSyf0qOW1dkoS6Nrfm_y9IIks5qoNn8gaJpZM4J2WxO
.

Copy link
Member Author

@ixdy ixdy Sep 12, 2016

Choose a reason for hiding this comment

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

the problem with using hack/install-etcd.sh (which also is the case with the fix I have, and with the go version we use, etc) is that different releases of kubernetes use different versions of etcd, Go, etc.

right now we run tests on all release branches with the latest image, which will likely result in incorrect behavior for older branches.

Copy link
Contributor

Choose a reason for hiding this comment

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

hack/install-etcd.sh from HEAD is packaged in an image and used in all branch testing?

@ixdy
Copy link
Member Author

ixdy commented Sep 19, 2016

closing for now. we can revisit when we have test images for each release.

@ixdy ixdy closed this Sep 19, 2016
@ixdy ixdy deleted the etcd-in-kubekins-test branch May 15, 2018 23:50
ostromart pushed a commit to ostromart/test-infra that referenced this pull request Jul 26, 2019
Automatic merge from submit-queue

Change cluster default name and add more configurable

**Release note**:

```release-note
none
```
Cluster name changed by https://github.com/istio/istio/pull/902/files#diff-4d4b343aca91a15218a827b3b0385f10R36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants