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
Check the failed phases either when uploading the snapshot in E2E testing #4162
Conversation
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.
This is a good spot, thanks! We should return from the function earlier though if we know the snapshot has failed rather than relying on the timeout to signal an error.
test/e2e/velero_utils.go
Outdated
phase == "Snapshotted" || | ||
phase == "Uploading" { | ||
// if the phase isn't "Uploaded", the uploading is either in progress or failed(will retry, if the retrying cannot recover, will timeout in the final) | ||
if phase != "Uploaded" { |
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.
We should return an error in the case where the snapshot reached a failed terminal state as it's not possible to recover from that. By checking for Uploaded
only, this function could poll for up to an hour for a snapshot that we know can't be used.
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.
@zubron I noticed that seems the uploading will be retry by the vSphere plugin, I'm not sure whether the failed uploading can be fixed by the retrying, so don't return the error here
Should we expect the retrying may fix the failed uploading or just return the error?
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.
Oh, sorry - I didn't realize that it would retry the upload 🤦♀️ In that case, it's probably best to ignore my comment and check with @dsu-igeek :)
…ting When the snapshot uploading is failed, it should not be treat as completed and continue. This commit covers both the phases of in progress and failed when uploading snapshot with vSphere plugin Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
a00a67b
to
65415bc
Compare
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.
LGTM
…ting (vmware-tanzu#4162) When the snapshot uploading is failed, it should not be treat as completed and continue. This commit covers both the phases of in progress and failed when uploading snapshot with vSphere plugin Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
…ting (vmware-tanzu#4162) When the snapshot uploading is failed, it should not be treat as completed and continue. This commit covers both the phases of in progress and failed when uploading snapshot with vSphere plugin Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
When the snapshot uploading is failed, it should not be treat as completed and continue.
This commit covers both the phases of in progress and failed when uploading snapshot with vSphere plugin
Signed-off-by: Wenkai Yin(尹文开) yinw@vmware.com
Thank you for contributing to Velero!
Please add a summary of your change
Does your change fix a particular issue?
Fixes #(issue)
Please indicate you've done the following:
/kind changelog-not-required
.site/content/docs/main
.