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

Fixed GCE PD tests to cleanup pods and disk properly after testing #68581

Merged
merged 1 commit into from
Sep 13, 2018

Conversation

davidz627
Copy link
Contributor

@davidz627 davidz627 commented Sep 12, 2018

See Title
Might solve: #68570

ALL these changes should be cherrypicked to 1.11.

VolumeTestCleanup changes should be cherrypicked to 1.11, 1.12, and master

/assign @msau42

NONE

@k8s-ci-robot k8s-ci-robot added do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 12, 2018
@davidz627
Copy link
Contributor Author

/kind bug
/sig storage

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. sig/storage Categorizes an issue or PR as relevant to SIG Storage. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 12, 2018
// - Force detach and delete.
pod, err := f.PodClient().Get(config.Prefix+"-client", metav1.GetOptions{})
Expect(err).NotTo(HaveOccurred(), "Failed getting pod %q.", config.Prefix+"-client")
detachAndDeletePDs(volumeName, []types.NodeName{types.NodeName(pod.Spec.NodeName)})
Copy link
Member

Choose a reason for hiding this comment

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

are there any other tests using this detach method? Can we remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there are other tests using it, but I don't think they will encounter the same problem as we're seeing in the parent issue. The tests all wait for detach before running their defer with the detach method, it seems like its just "insurance" in the defer to cleanup after the test. I believe its out of scope of this PR to remove that.

Copy link
Member

Choose a reason for hiding this comment

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

Sure, can you open an issue to clean it up later? I dislike the e2e doing the detach because it requires the e2e to know the node that the test pod got scheduled to, and deleting the pod should effectively do the same thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@davidz627 davidz627 changed the title Fixed GCE PD tests to cleanup pods and disk properly after testing [WIP] Fixed GCE PD tests to cleanup pods and disk properly after testing Sep 12, 2018
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 12, 2018
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 12, 2018
@davidz627 davidz627 changed the title [WIP] Fixed GCE PD tests to cleanup pods and disk properly after testing Fixed GCE PD tests to cleanup pods and disk properly after testing Sep 12, 2018
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 12, 2018
@davidz627
Copy link
Contributor Author

@msau42 changed the PR and comments addressed

@davidz627
Copy link
Contributor Author

ALL these changes should be cherrypicked to 1.11.

VolumeTestCleanup changes should be cherrypicked to 1.11, 1.12, and master

@msau42
Copy link
Member

msau42 commented Sep 12, 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 Sep 12, 2018
@davidz627
Copy link
Contributor Author

/assign @MaciekPytel

@msau42
Copy link
Member

msau42 commented Sep 13, 2018

/retest

@MaciekPytel
Copy link
Contributor

Thanks for fixing this so quickly!

@MaciekPytel MaciekPytel added cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. and removed do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. labels Sep 13, 2018
@shyamjvs
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidz627, msau42, shyamjvs

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 Sep 13, 2018
@k8s-ci-robot k8s-ci-robot merged commit 7eab6a4 into kubernetes:release-1.10 Sep 13, 2018
@davidz627 davidz627 deleted the fix/pdTestLeak branch September 13, 2018 17:17
k8s-ci-robot added a commit that referenced this pull request Sep 14, 2018
…581-upstream-release-1.11

Automated cherry pick of #68581: Fixed GCE PD tests to wait for pod deletion after usage, and
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. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. 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. 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.

None yet

6 participants