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

Stop infinite retries of upload and clean up snapshot #532

Merged
merged 1 commit into from
Jun 2, 2023

Conversation

lipingxue
Copy link
Collaborator

@lipingxue lipingxue commented May 18, 2023

What this PR does / why we need it:
Currently, we Infinite retry of upload in the Data Manager. When upload keeps failing , the local snapshot was not deleted. We need to delete snapshots if upload keeps failing.
Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

With this change, users can configure the "upload-cr-retry-max" in  configmap "velero-vsphere-plugin-config".

If this parameter is not specified, the default value 10 will be used.  Upload will retry until it reaches the 
maximum retry. 

After that, we will try to delete the local snapshot and mark the upload cr as "UploadFailedAfterRetry" and 
stop further retry.

@lipingxue
Copy link
Collaborator Author

Testing is done. See this
pr-test-result.txt

@svcbot-qecnsdp
Copy link

Sorry, some of the pre-check tests are failing for this PR !

Please check the Jenkins job for more details
https://container-dp.svc.eng.vmware.com/job/CNSDP-CI/805/

@lipingxue lipingxue force-pushed the lipingx-upload-cr-retry branch 2 times, most recently from d5aa083 to 4e90441 Compare May 18, 2023 20:51
@svcbot-qecnsdp
Copy link

Sorry, some of the pre-check tests are failing for this PR !

Please check the Jenkins job for more details
https://container-dp.svc.eng.vmware.com/job/CNSDP-CI/806/

Copy link
Contributor

@xing-yang xing-yang left a comment

Choose a reason for hiding this comment

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

Please also update the README accordingly.

pkg/apis/backupdriver/v1alpha1/snapshot.go Show resolved Hide resolved
pkg/apis/datamover/v1alpha1/upload.go Show resolved Hide resolved
pkg/constants/constants.go Show resolved Hide resolved
pkg/constants/constants.go Show resolved Hide resolved
pkg/controller/upload_controller.go Outdated Show resolved Hide resolved
pkg/controller/upload_controller.go Outdated Show resolved Hide resolved
pkg/controller/upload_controller.go Outdated Show resolved Hide resolved
@svcbot-qecnsdp
Copy link

Sorry, some of the pre-check tests are failing for this PR !

Please check the Jenkins job for more details
https://container-dp.svc.eng.vmware.com/job/CNSDP-CI/808/

Copy link
Collaborator

@deepakkinni deepakkinni left a comment

Choose a reason for hiding this comment

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

Can you add some unit tests as well.

pkg/apis/backupdriver/v1alpha1/snapshot.go Outdated Show resolved Hide resolved
pkg/constants/constants.go Outdated Show resolved Hide resolved
pkg/constants/constants.go Show resolved Hide resolved
pkg/utils/utils.go Show resolved Hide resolved
pkg/utils/utils.go Show resolved Hide resolved
pkg/controller/upload_controller.go Outdated Show resolved Hide resolved
pkg/controller/upload_controller.go Outdated Show resolved Hide resolved
@svcbot-qecnsdp
Copy link

Sorry, some of the pre-check tests are failing for this PR !

Please check the Jenkins job for more details
https://container-dp.svc.eng.vmware.com/job/CNSDP-CI/811/

@lipingxue
Copy link
Collaborator Author

Can you add some unit tests as well.

Yes. I added two unit tests. This is the unit test result.
unit-test-May-23.txt

@svcbot-qecnsdp
Copy link

Sorry, some of the pre-check tests are failing for this PR !

Please check the Jenkins job for more details
https://container-dp.svc.eng.vmware.com/job/CNSDP-CI/817/

@xing-yang
Copy link
Contributor

LGTM

Signed-off-by: Liping Xue <lipingx@vmware.com>
@lipingxue
Copy link
Collaborator Author

@xing-yang I have squashed the commits, please help to merge it. Thanks!

@svcbot-qecnsdp
Copy link

Sorry, some of the pre-check tests are failing for this PR !

Please check the Jenkins job for more details
https://container-dp.svc.eng.vmware.com/job/CNSDP-CI/818/

@lipingxue
Copy link
Collaborator Author

@xing-yang I have squashed the commits, please help to merge it. Thanks!

@xing-yang Could you help to merge this MR? Thanks!

@xing-yang xing-yang merged commit 4f710f3 into vmware-tanzu:main Jun 2, 2023
lipingxue added a commit to lipingxue/velero-plugin-for-vsphere that referenced this pull request Jun 27, 2023
Signed-off-by: Liping Xue <lipingx@vmware.com>
lipingxue added a commit to lipingxue/velero-plugin-for-vsphere that referenced this pull request Oct 26, 2023
Signed-off-by: Liping Xue <lipingx@vmware.com>
lipingxue added a commit to lipingxue/velero-plugin-for-vsphere that referenced this pull request Oct 27, 2023
Signed-off-by: Liping Xue <lipingx@vmware.com>
lipingxue added a commit that referenced this pull request Oct 27, 2023
* Update script.
Signed-off-by: Liping Xue <lipingx@vmware.com>

Signed-off-by: Liping Xue <lipingx@vmware.com>

* Add warning message in compatibility table. (#534)

* Add warning message in compatibility table.
Signed-off-by: Liping Xue <lipingx@vmware.com>

* Address comment from Xing.
Signed-off-by: Liping Xue <lipingx@vmware.com>

* Update link to vSphere documentation in supervisor-datamgr.md file (#536)

* Update vSphere doc link in supervisor-datamgr.md.
Signed-off-by: Liping Xue <lipingx@vmware.com>

* Address comment from Xing.
Signed-off-by: Liping Xue <lipingx@vmware.com>

* Update link to data manager ova. (#537)

Signed-off-by: Liping Xue <lipingx@vmware.com>

* Fix upload retry. (#532)

Signed-off-by: Liping Xue <lipingx@vmware.com>

* Update support matrix for Vanilla, WCP and GC. (#538)

Signed-off-by: Liping Xue <lipingx@vmware.com>

* Update support matrix for WCP.
Signed-off-by: Liping Xue lipingx@vmware.com

Signed-off-by: Liping Xue <lipingx@vmware.com>

* Update Snapshot and upload CRD status in doc. (#545)

Signed-off-by: Liping Xue lipingx@vmware.com

Signed-off-by: Liping Xue <lipingx@vmware.com>

* Add document on Deploy Velero in Supervisor Cluster with Images from Private Registry. (#543)

Signed-off-by: Liping Xue lipingx@vmware.com

Signed-off-by: Liping Xue lipingx@vmware.com
Signed-off-by: Liping Xue <lipingx@vmware.com>

* Update support matrix for Vanilla. (#548)

Signed-off-by: Liping Xue <lipingx@vmware.com>

* Bump the golang.org/x/net version to v0.17.0 to address CVEs. (#552)

Signed-off-by: Xun Jiang <jxun@vmware.com>
Signed-off-by: Liping Xue <lipingx@vmware.com>

---------

Signed-off-by: Liping Xue <lipingx@vmware.com>
Signed-off-by: Liping Xue lipingx@vmware.com
Signed-off-by: Xun Jiang <jxun@vmware.com>
Co-authored-by: Xun Jiang/Bruce Jiang <59276555+blackpiglet@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants