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

kubeadm: pull kubernetes-anywhere per job #9117

Merged
merged 1 commit into from
Aug 29, 2018

Conversation

neolit123
Copy link
Member

kubernetes-anywhere (k-a) now has a specific branch for use with
e2e tests and it is no longer needed to bake a k-a commit SHA into
the kubeadm image.

ref:
kubernetes-retired/kubernetes-anywhere#555
kubernetes/kubernetes#66338

The following is used to pull the kubeadm-e2e branch of k-a:
--repo=k8s.io/kubernetes-anywhere=kubeadm-e2e

This removes a step where after fixing a k-a bug, the test-infra
kubeadm image has to be updated.

/area jobs
/assign @BenTheElder
/cc @timothysc
/cc @mohammedzee1000

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. area/config Issues or PRs related to code in /config labels Aug 21, 2018
@@ -21,14 +21,6 @@ if [ ! -e test-infra ]; then
git clone https://github.com/kubernetes/test-infra
Copy link
Member Author

Choose a reason for hiding this comment

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

should this be moved to --repo as well eventually?

Copy link
Member

Choose a reason for hiding this comment

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

this should be left up to the underlying runner in the base image, when using bootstrap.py we have a runner that does some things like that. that runner is also needed for EG the bazel cache.

Copy link
Member

Choose a reason for hiding this comment

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

really we should just do away with this runner being the entrypoint and do any of:

  • do things ahead of time, eg pre-installing tools in the image
  • let bootstrap check things out
  • let the testing script do things
    instead of the runner / entrypoint.

Copy link
Member Author

Choose a reason for hiding this comment

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

i need to look up what the base image is.

@@ -21,14 +21,6 @@ if [ ! -e test-infra ]; then
git clone https://github.com/kubernetes/test-infra
fi

if [ ! -e kubernetes-anywhere ]; then
Copy link
Member Author

@neolit123 neolit123 Aug 21, 2018

Choose a reason for hiding this comment

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

we have -e checks in the runner. i guess using --repo for the jobs instead would pull every time?
probably OK for smaller repos.

Copy link
Member

Choose a reason for hiding this comment

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

this doesn't really make sense, I don't think this check would be true under any circumstance

# immediately break e2e jobs, and we have control over upgrading/downgrading.
git -C kubernetes-anywhere checkout a26f42c716028c4ba967b2d2f3de5ed50acc51da
fi

# This is required until https://github.com/kubernetes/kubernetes-anywhere/issues/332
Copy link
Member Author

Choose a reason for hiding this comment

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

i've re-opened this issue as it still exists.

# immediately break e2e jobs, and we have control over upgrading/downgrading.
git -C kubernetes-anywhere checkout a26f42c716028c4ba967b2d2f3de5ed50acc51da
fi

# This is required until https://github.com/kubernetes/kubernetes-anywhere/issues/332
# is implemented.
if [ ! -e kubernetes-anywhere/phase1/gce/account.json ]; then
Copy link
Member Author

Choose a reason for hiding this comment

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

@BenTheElder you've mentioned that --repo would pull in $PWD/../kubernetes-anywhere
do i need to adjust the paths in this last part of the file to be ../kubernetes-anywhere/?

Copy link
Member Author

Choose a reason for hiding this comment

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

i also saw the discussion about not having a custom image.

i'm not exactly sure why the ln -s action is here and not in the kubernetes-anywhere tree, but is it possible to move the ./test-infra/jenkins/bootstrap.py call in the job?

this can go in a separate PR too, i guess.

Copy link
Member

Choose a reason for hiding this comment

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

So when the init scripts hand off to the testing code the current directory will be a checkout of the first --repo flag, which is typically the repo under test. Additional repos will be adjacent in ./../$OTHER_REPO.

I'm not sure why we do anything in this image. Ideally we'd use the underlying runner in the base image only and not do anything at runtime in this image.

@timothysc
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 21, 2018
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 22, 2018
@neolit123
Copy link
Member Author

neolit123 commented Aug 22, 2018

@BenTheElder
i've removed the code in question from the kubeadm/runner and made a k-a PR to add that code in there instead:
kubernetes-retired/kubernetes-anywhere#557

the kubeadm runner now looks like the one for gcloud:
https://github.com/kubernetes/test-infra/blob/master/images/gcloud/runner

i still don't understand what the base image is, but for the kubeadm image i'm seeing that it installs terraform, so i'm not exactly sure how the kubeadm image can be removed:
https://github.com/kubernetes/test-infra/blob/master/images/kubeadm/Dockerfile#L44-L49

possibly this has to happen in a separate PR.

@neolit123
Copy link
Member Author

le bump. 👀

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Copyright 2017 The Kubernetes Authors.
# Copyright 2018 The Kubernetes Authors.
Copy link
Member

Choose a reason for hiding this comment

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

we should drop this runner entirely, we can use the entrypoint from the base image

@BenTheElder
Copy link
Member

Sorry I got behind on PR reviews, going through the backlog today.

i still don't understand what the base image is, but for the kubeadm image i'm seeing that it installs terraform, so i'm not exactly sure how the kubeadm image can be removed:

We don't need to remove this image, but we should drop the runner. The base images for this go like:
images/bootstrap (generic-ish base testing image) -> images/kubekins-e2e (generic-ish e2e / build image) -> images/kubeadm (adds tools specifically for kubernetes-anywhere).

@@ -9,6 +9,7 @@ periodics:
- image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7
args:
- --repo=k8s.io/kubernetes=master
- --repo=k8s.io/kubernetes-anywhere=kubeadm-e2e
Copy link
Member

Choose a reason for hiding this comment

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

skimming through this PR I don't see us doing this for other k-a jobs (the presubmits?) we should find them and do this for all k-a jobs

@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. area/prow Issues or PRs related to prow labels Aug 27, 2018
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 27, 2018
@neolit123
Copy link
Member Author

updated:

  • removed the kubeadm runner
  • added --repo 3 times for k-a in config/jobs/kubernetes/sig-testing/bazel-build-test.yaml as the periodics seem to be there now (?)

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Aug 27, 2018

@neolit123: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-test-infra-gubernator b7798f9 link /test pull-test-infra-gubernator

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

kubernetes-anywhere (k-a) now has a specific branch for use with
e2e tests and it is no longer needed to bake a k-a commit SHA into
the kubeadm image.

The following is used to pull the `kubeadm-e2e` branch of k-a:
`--repo=k8s.io/kubernetes-anywhere=kubeadm-e2e`

This removes a step where after fixing a k-a bug, the test-infra
kubeadm image has to be updated.

Also removes the kubeadm runner as it is no longer needed.
@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Aug 28, 2018
Copy link
Member

@BenTheElder BenTheElder left a comment

Choose a reason for hiding this comment

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

/lgtm
/hold
we should bump the images after this, will do that

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder, neolit123, timothysc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 28, 2018
@BenTheElder
Copy link
Member

Thanks for tackling this! :-)

@neolit123
Copy link
Member Author

thanks a lot.
hope the tests go 📗 after this.

@BenTheElder
Copy link
Member

alright let's merge this, I'll send out an image bump PR to go with it
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 29, 2018
@k8s-ci-robot k8s-ci-robot merged commit fbf06e2 into kubernetes:master Aug 29, 2018
@k8s-ci-robot
Copy link
Contributor

@neolit123: Updated the job-config configmap using the following files:

  • key generated-security-jobs.yaml using file config/jobs/kubernetes-security/generated-security-jobs.yaml
  • key kubeadm.yaml using file config/jobs/kubernetes/sig-cluster-lifecycle/kubeadm.yaml
  • key bazel-build-test.yaml using file config/jobs/kubernetes/sig-testing/bazel-build-test.yaml

In response to this:

kubernetes-anywhere (k-a) now has a specific branch for use with
e2e tests and it is no longer needed to bake a k-a commit SHA into
the kubeadm image.

ref:
kubernetes-retired/kubernetes-anywhere#555
kubernetes/kubernetes#66338

The following is used to pull the kubeadm-e2e branch of k-a:
--repo=k8s.io/kubernetes-anywhere=kubeadm-e2e

This removes a step where after fixing a k-a bug, the test-infra
kubeadm image has to be updated.

/area jobs
/assign @BenTheElder
/cc @timothysc
/cc @mohammedzee1000

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@neolit123
Copy link
Member Author

neolit123 commented Aug 29, 2018

@BenTheElder

i think this might be the first indication that something is not right about the new k-a setup:
https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/ci-kubernetes-e2e-kubeadm-gce-upgrade-1-10-1-11/961

/workspace/kubernetes-anywhere/.config

perhaps it's not cloning in the correct folder.

https://k8s-testgrid.appspot.com/sig-cluster-lifecycle-all#gce-kubeadm-upgrade-1.10-1.11

waiting on some of the other tests to start too.

@BenTheElder
Copy link
Member

@neolit123
Copy link
Member Author

neolit123 commented Aug 29, 2018

i don't have enough details.
should it be added and if so what should it contain?

edit: investigating.

@BenTheElder
Copy link
Member

not sure, but /workspace/kubernetes-anywhere/.config, /workspace/kubernetes-anywhere should actually have the k-a checkout IIRC, and I don't know why it would have a .config already 🤔

@neolit123
Copy link
Member Author

i think i found a problem in the logs:
https://storage.googleapis.com/kubernetes-jenkins/logs/ci-kubernetes-e2e-kubeadm-gce-upgrade-1-10-1-11/961/build-log.txt

Checkout: /workspace/k8s.io/kubernetes-anywhere kubeadm-e2e to /workspace/k8s.io/kubernetes- anywhere
I0829 21:00:56.980] Call:  git init k8s.io/kubernetes-anywhere
I0829 21:00:56.987] Initialized empty Git repository in /workspace/k8s.io/kubernetes-anywhere/.git/

so it's checked out in /workspace/k8s.io

i think i need to update the value of --kubernetes-anywhere-path for all jobs:

path: *kubernetesAnywherePath,

as --kubernetes-anywhere-path=/workspace/kubernetes-anywhere is not correct.
should be --kubernetes-anywhere-path=/workspace/k8s/kubernetes-anywhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/config Issues or PRs related to code in /config area/jobs area/prow Issues or PRs related to prow cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

4 participants