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

Wait for subPath error event instead of waiting full minute #68689

Closed
wants to merge 1 commit into from

Conversation

wongma7
Copy link
Contributor

@wongma7 wongma7 commented Sep 14, 2018

What this PR does / why we need it: Currently, "should fail for new directories when readOnly specified in the volumeSource" always waits for a full minute for the error event to show up. However, the test can end earlier by watching/polling for events.

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 #

Special notes for your reviewer: this patch has the side effect of upping our wait time from 1 minute to PodStartTimeout 5 minutes...is this acceptable?

Release note:

NONE

/cc @mkimuram

@k8s-ci-robot
Copy link
Contributor

@wongma7: GitHub didn't allow me to request PR reviews from the following users: mkimuram.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

What this PR does / why we need it: Currently, "should fail for new directories when readOnly specified in the volumeSource" always waits for a full minute for the error event to show up. However, the test can end earlier by watching/polling for events.

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 #

Special notes for your reviewer: this test has the side effect of upping our wait time from 1 minute to PodStartTimeout 5 minutes...is this acceptable?

Release note:

NONE

/cc @mkimuram

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.

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. sig/testing Categorizes an issue or PR as relevant to SIG Testing. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Sep 14, 2018
@wongma7
Copy link
Contributor Author

wongma7 commented Sep 14, 2018

/sig storage

@k8s-ci-robot k8s-ci-robot added the sig/storage Categorizes an issue or PR as relevant to SIG Storage. label Sep 14, 2018
@wongma7
Copy link
Contributor Author

wongma7 commented Sep 14, 2018

/kind bug

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Sep 14, 2018
@wongma7
Copy link
Contributor Author

wongma7 commented Sep 14, 2018

on second thought i shouldn't add WaitForErrorEvent and should just use the existing WaitForErrorEventOrSuccess... obviously success means a failure of the test and we can end earlier than 5 minutes.

Init container makes this possible will go back to original

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 14, 2018
@wongma7 wongma7 force-pushed the subpath branch 2 times, most recently from 5358932 to c610ca3 Compare September 17, 2018 14:23
@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 17, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: wongma7
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: marun

If they are not already assigned, you can assign the PR to them by writing /assign @marun in a comment when ready.

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

@mkimuram
Copy link
Contributor

I like your idea of shortening the time of this test, because it makes sense not to wait for the pod that won't be running to be running.

I think that it would be better to also make @jsafrane and @msau42 involved. They are the original author of
testPodFailSupath and testPodFailSubpathError.

}
for _, e := range evnts.Items {
switch e.Reason {
case events.KillingContainer, events.FailedToCreateContainer, sysctl.UnsupportedReason, sysctl.ForbiddenReason:
Copy link
Contributor

Choose a reason for hiding this comment

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

Are this list of events enough to cover all error events?
If not, won't it be better to take expected reason as an argument for WaitForErrorEvent to ensure that the expected event with the expected reason matches here?

@k8s-ci-robot
Copy link
Contributor

@wongma7: PR needs rebase.

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.

@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 7, 2018
@msau42
Copy link
Member

msau42 commented Oct 8, 2018

Is this still needed? I think there were changes made to this area that fixed some flakes

@wongma7
Copy link
Contributor Author

wongma7 commented Oct 9, 2018

no, #69300 does roughly the same thing. I think waiting "WaitForPodRunning" to timeout is still redundant but we can keep it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. 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/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

4 participants