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

🌱 Make node drain delete timeout configurable in e2e framework #4830

Merged

Conversation

CecileRobertMichon
Copy link
Contributor

What this PR does / why we need it: Previously, we were adding 2 minutes to the nodeDrainTimeout for each node that needed to get deleted in order to come up with the interval timeout in the nodeDrainTimeout test. 2 minutes is not flexible enough for all infrastructure and providers, it should be a configurable timeout.

Now, we take a node-drain/wait-machine-deleted interval in the e2e config and calculate the appropriate machine deployment and control plane scale down timeout by adding the provided machine deletion timeout with the nodeDrainTimeout and multiply it by the number of machines.

There is no behavior change for the existing docker infra node drain test (timeouts stay the same for MD and KCP)

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 18, 2021
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 18, 2021
@CecileRobertMichon CecileRobertMichon changed the title 🌱 Make node drain delete timeout configurable in e2e framework 🌱 Make node drain delete timeout configurable in e2e framework Jun 18, 2021
@CecileRobertMichon
Copy link
Contributor Author

/test ls

@k8s-ci-robot
Copy link
Contributor

@CecileRobertMichon: The specified target(s) for /test were not found.
The following commands are available to trigger jobs:

  • /test pull-cluster-api-build-main
  • /test pull-cluster-api-make-main
  • /test pull-cluster-api-apidiff-main
  • /test pull-cluster-api-verify
  • /test pull-cluster-api-test-main
  • /test pull-cluster-api-e2e-main
  • /test pull-cluster-api-e2e-ipv6-main
  • /test pull-cluster-api-e2e-full-main
  • /test pull-cluster-api-e2e-workload-upgrade-1-21-latest-main

Use /test all to run the following jobs:

  • pull-cluster-api-build-main
  • pull-cluster-api-apidiff-main
  • pull-cluster-api-verify
  • pull-cluster-api-test-main
  • pull-cluster-api-e2e-main
  • pull-cluster-api-e2e-ipv6-main

In response to this:

/test ls

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.

@CecileRobertMichon
Copy link
Contributor Author

/test pull-cluster-api-e2e-full-main
/hold for the above node drain test to succeed

@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 Jun 18, 2021
@@ -128,3 +128,4 @@ intervals:
default/wait-machine-remediation: ["5m", "10s"]
node-drain/wait-deployment-available: ["3m", "10s"]
node-drain/wait-control-plane: ["15m", "10s"]
node-drain/wait-machine-deleted: ["2m", "10s"]
Copy link
Member

@enxebre enxebre Jun 18, 2021

Choose a reason for hiding this comment

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

Being new to this code this name makes me think this is the timeout to wait for a machine to be fully deleted, though by reading the code I understand this is the timeout for the new machine to come up, not sure if there's a better name may be node-drain/wait-machine-recreated

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the timeout waiting for a machine to be fully deleted (if you look at where it's used in the code, it's for scaling to 0 replica count for MD - and 3 to 1 for control plane)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tried to explain this in PR description, let me know if it's unclear:

Now, we take a node-drain/wait-machine-deleted interval in the e2e config and calculate the appropriate machine deployment and control plane scale down timeout by adding the provided machine deletion timeout with the nodeDrainTimeout and multiply it by the number of machines.

@enxebre
Copy link
Member

enxebre commented Jun 18, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 18, 2021
Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

/lgtm

@CecileRobertMichon
Copy link
Contributor Author

/hold cancel
/approve

@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 Jun 18, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon

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 Jun 18, 2021
@k8s-ci-robot k8s-ci-robot merged commit 0967466 into kubernetes-sigs:master Jun 18, 2021
@k8s-ci-robot k8s-ci-robot added this to the v0.4 milestone Jun 18, 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