-
Notifications
You must be signed in to change notification settings - Fork 193
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
[V2] fix: fix issue where file is read before written in e2e tests 🐞 #1326
[V2] fix: fix issue where file is read before written in e2e tests 🐞 #1326
Conversation
Hi @jmclong. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/ok-to-test |
First test failure was in This is a test impacted by my change, but the issue appears unrelated. The first pod is deleted, but the second pod is never able to attach or mount the volume because it thinks it is still in use. If you look when the test is trying to clean up the PV on test teardown, it polls for the full 10 minutes. Ginkgo does not seem to report errors that occur during defers after the initial error.
The second failure is in This test finds the 'FailedMount' event, but the PV never gets deleted as it polls for the full 10 minutes. |
7a67d6c
to
a410368
Compare
Failures might be due (or related) to #1300? The PVs get released but never deleted. |
a410368
to
b0e613e
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: edreed, jmclong, landreasyan 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 |
What type of PR is this?
/kind bug
/kind flake
What this PR does / why we need it:
This change fixes a test issue in the several e2e tests, where we are looking for a file in pods to contain a certain string. The
framework.LookForStringInPodExec
method fails the test automatically if the command executed has a non-zero exit code. This can happen if the pod has not completed writing to the file.There are some additional methods like
framework.RunHostCmd
that we might consider using, but these assume the pod is running Linux. Because of this, I decided to roll our own method.Requirements:
Special notes for your reviewer:
I changed name from
Exec
=>PollForStringInPodsExec
to make it clearer that the command passed in will be executed multiple times.There is some duplicated code in
test/resources/deployment.go
andtest/resources/statefulset.go
, but I think it is better to do this in a separate PR if we want to refactor that.Fixes e2e test failure symptoms similar to this:
Release note: