-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Conversation
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
/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. |
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
/hold cancel |
[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 |
/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 :/ |
/retest |
2 similar comments
/retest |
/retest |
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