-
Notifications
You must be signed in to change notification settings - Fork 254
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
Fix populators not repopulating pvc after it was deleted #3056
Fix populators not repopulating pvc after it was deleted #3056
Conversation
fd6becd
to
108ba33
Compare
/retest |
tests/cloner_test.go
Outdated
@@ -138,6 +138,33 @@ var _ = Describe("all clone tests", func() { | |||
Expect(uploader.DeletionTimestamp).To(BeNil()) | |||
}) | |||
|
|||
It("should recreate and reclone target pvc if it was deleted", func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this test will actually run Serially since it's under Describe("[rfe_id:1277][crit:high][vendor:cnv-qe@redhat.com][level:component]Cloner Test Suite", Serial, func()
Can we maybe move it around so it can run parallel, or is there a constraint I am missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes sure thanks for noticing, I guess it was introduced recently
tests/import_test.go
Outdated
By("Verify PVC prime was created") | ||
pvcPrime, err = utils.WaitForPVC(f.K8sClient, pvc.Namespace, populators.PVCPrimeName(pvc)) | ||
Expect(err).ToNot(HaveOccurred()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a dumb question (I guess this is done in many tests), can't PVC prime already be deleted in this point if import was quick enough to complete? and why are you verifying it's creation in this flow? I guess PVC bound and verifying the content in the end are more than enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I agree, I did several changes in this test, since I found the deletePVCByUID then its safe enough to see that the new created PVC became bound again.. (I had a race there with the get). Ill simplify the test more.
Signed-off-by: Shelly Kagan <skagan@redhat.com>
In case someone deleted the pvc a new pvc is created and the status of the dv is still succeded. when using populators in order for the population to restart and the dv state to change accordingly we need to retrigger the population, this depends on the existing of the source CR. That CR should exist as long as the pvc pod state is not succeeded. When the pvc is recreated the succeded pod state annotation was removed. Adjusted UT accordingly Signed-off-by: Shelly Kagan <skagan@redhat.com>
Move cloner test to a parallel test suite. Simplify import test. Signed-off-by: Shelly Kagan <skagan@redhat.com>
108ba33
to
4188a86
Compare
Looks really good. Maybe add an upload functional test? |
Random question. Did we not ever have tests that check the PVC recreated & repopulated upon deletion? |
@akalenyu hmm from what I saw I didnt find any.. |
There's
|
Yeah this is different since we delete the pvc during the import so the dv haven't reached succeeded state yet thatss why we didnt catch the bug |
@akalenyu @alromeros @arnongilboa can you review again? |
/lgtm |
cc @mhenriks |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mhenriks 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 |
/cherrypick release-v1.57 |
@ShellyKa13: #3056 failed to apply on top of branch "release-v1.57":
In response to this:
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. |
Needs a backport to 1.58 as well |
/cherrypick release-v1.58 |
@ShellyKa13: new pull request created: #3071 In response to this:
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. |
What this PR does / why we need it:
This PR should fix this bug:
Jira-ticket: https://issues.redhat.com/browse/CNV-35085
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 #CNV-35085
Special notes for your reviewer:
Release note: