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

Updated Regional PD failover test to use node taints instead of instance group deletion #69700

Merged
merged 1 commit into from
Oct 25, 2018

Conversation

verult
Copy link
Contributor

@verult verult commented Oct 11, 2018

What this PR does / why we need it: The existing failover mechanism (deleting GCE managed instance groups) relies on the wrong NodeInstanceGroup parameter format from the test context for regional clusters, and there is no simple way to continue using the instance group technique.

This PR fixes the problem and also addresses a previous TODO left in the test by converting to tainting nodes instead.

Need to be cherry-picked to 1.12

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 #69005

Release note:

NONE

/sig storage
/assign @msau42

@k8s-ci-robot k8s-ci-robot added the release-note-none Denotes a PR that doesn't merit a release note. label Oct 11, 2018
@k8s-ci-robot k8s-ci-robot added sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Oct 11, 2018
framework.ExpectNoError(framework.WaitForReadyNodes(c, nodeCount, framework.RestartNodeReadyAgainTimeout),
"Error waiting for nodes from the new instance group to become ready.")
framework.Logf("removing previously added node taints")
nodesInZone, err = c.CoreV1().Nodes().List(metav1.ListOptions{LabelSelector: selector.String()})
Copy link
Member

Choose a reason for hiding this comment

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

do you need to call this again or can you reuse the nodes list from above? Any error here could skip the taint removal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep the list can be reused. Thanks for the catch!

}
}
node.Spec.Taints = newTaints
_, err := c.CoreV1().Nodes().Update(&node)
Copy link
Member

Choose a reason for hiding this comment

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

you might need to retry the update a few times. Node currently does a heartbeat every few seconds by updating the node object.

@@ -44,6 +48,7 @@ import (
const (
pvDeletionTimeout = 3 * time.Minute
statefulSetReadyTimeout = 3 * time.Minute
taintKey = "zoneTaint"
Copy link
Member

Choose a reason for hiding this comment

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

I would make this key name more specific to make it easier to debug. Maybe use the test namespace name?

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 21, 2018
@verult
Copy link
Contributor Author

verult commented Oct 22, 2018

Addressed comments

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 22, 2018
@msau42
Copy link
Member

msau42 commented Oct 22, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 22, 2018
@msau42
Copy link
Member

msau42 commented Oct 23, 2018

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: msau42, verult

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 Oct 23, 2018
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 24, 2018
@verult
Copy link
Contributor Author

verult commented Oct 24, 2018

Rebased and resolved an import conflict. PTAL

@msau42
Copy link
Member

msau42 commented Oct 24, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 24, 2018
@msau42
Copy link
Member

msau42 commented Oct 24, 2018

/kind failing-test

@k8s-ci-robot k8s-ci-robot added kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Oct 24, 2018
@verult
Copy link
Contributor Author

verult commented Oct 24, 2018

/retest

@k8s-ci-robot k8s-ci-robot merged commit 0df5462 into kubernetes:master Oct 25, 2018
k8s-ci-robot added a commit that referenced this pull request Jan 29, 2019
…-release-1.12

Automated cherry pick of #69700: Updated Regional PD failover test to use node taints instead
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. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RePD failover test flaking
3 participants