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

Kubetest2 - Cleanup leaked resources from previous clusters #11250

Merged
merged 2 commits into from
Apr 17, 2021

Conversation

rifelpet
Copy link
Member

If --up is specified then we always delete any previous cluster with the same name since it would conflict otherwise and ensures leaked resources are cleaned up.

We don't do this if --terraform is specified because Down() will run terraform destroy but each kubetest2 invocation uses a random temp directory for its terraform state, so it wouldn't know of any resources to destroy

If --up is specified then we always delete any previous cluster with the same name since it would conflict otherwise and ensures leaked resources are cleaned up.

We don't do this if --terraform is specified because Down() will run `terraform destroy` but each kubetest2 invocation uses a random temp directory for its terraform state, so it wouldn't know of any resources to destroy
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 17, 2021
@rifelpet
Copy link
Member Author

/hold

this was intended to fix the leaked resources identified in #11249 but each job invocation in one PR will have different cluster names because the cluster name is dependent on the JOB_NAME (which remains constant) and BUILD_ID (which varies every invocation), so there will never be a cluster with the same name that is running at the start of an invocation.

One option is to have presubmit jobs replace BUILD_ID with the PR number in their cluster name.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 17, 2021
This should force the same e2e job in one PR's presubmits to use the same cluster name on every job invocation.

Mimics the kubetest1 logic here: https://github.com/kubernetes/test-infra/blob/f7e21a3c18f4f4bbc7ee170675ed53e4544a0632/scenarios/kubernetes_e2e.py#L242-L251
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 17, 2021
@rifelpet
Copy link
Member Author

/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 Apr 17, 2021
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 17, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

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 Apr 17, 2021
@rifelpet
Copy link
Member Author

/retest

Its possible that all of the regions are "full" of leaked VPCs from other PRs. It seems that aws-janitor has been failing: https://testgrid.k8s.io/sig-testing-maintenance#ci-aws-janitor so we may need to get that working first :/

@hakman
Copy link
Member

hakman commented Apr 17, 2021

/retest

2 similar comments
@johngmyers
Copy link
Member

/retest

@hakman
Copy link
Member

hakman commented Apr 17, 2021

/retest

@k8s-ci-robot k8s-ci-robot merged commit 27f05ca into kubernetes:master Apr 17, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.21 milestone Apr 17, 2021
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. 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants