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

fix(cstor restore): use relevant labels to fetch CSPI name #191

Merged
merged 1 commit into from
Oct 7, 2020

Conversation

mittachaitu
Copy link
Contributor

@mittachaitu mittachaitu commented Oct 7, 2020

Signed-off-by: mittachaitu sai.chaithanya@mayadata.io

This PR fixes the issue to fetch the status of CStorRestore.

Bug Description:
Currently, CStorRestore resource is created using one of the label called
cstorpoolinstance.openebs.io/name: <cspi_name> but while
fetching the status of CStorRestore we are also fetching Pool-manager
status(Only in a case where CStorRestore status is not in Done/Failed state).
To fetch the pool manager we are using the CSPI name from non-existing
label(i.e openebs.io/cstor-pool-instance) of CStorRestore resource.
Due to that, there were partial failure errors in velero restore.

Below are the logs before fix:

I1007 07:12:14.661377       1 restore_endpoint.go:520] Restore:percona-backup-7621141a-c5bb-49e1-9d79-5a01289b9771 created for volume "pvc-45d71edb-30d8-48f5-b591-a7cd3d7b1ecd" CSPI: cstor-cspc-disk-pool-7rjt
I1007 07:12:14.665541       1 restore_endpoint.go:520] Restore:percona-backup-30b70276-0d96-4de6-804c-4211df79c939 created for volume "pvc-45d71edb-30d8-48f5-b591-a7cd3d7b1ecd" CSPI: cstor-cspc-disk-pool-9ckn
I1007 07:12:19.668323       1 restore_endpoint.go:69] Got restore GET request
E1007 07:12:19.674539       1 backup_restore_helper.go:36] failed to find pool manager, empty CSPI is provided
E1007 07:12:19.674584       1 backup_restore_helper.go:72] failed to find pool manager, empty CSPI is provided
I1007 07:12:19.677685       1 restore_endpoint.go:563] Restore:percona-backup-1c4b101f-68e7-4bd8-a717-92f90dcebd7a status is Failed
E1007 07:12:19.677707       1 backup_restore_helper.go:36] failed to find pool manager, empty CSPI is provided
E1007 07:12:19.677714       1 backup_restore_helper.go:72] failed to find pool manager, empty CSPI is provided
I1007 07:12:19.680065       1 restore_endpoint.go:563] Restore:percona-backup-30b70276-0d96-4de6-804c-4211df79c939 status is Failed

After the fix below are the logs:

 Restore volume 'pvc-9125a66d-667b-491d-8c95-ef9bd1180698' created successfully 
I1007 13:23:08.418469       1 restore_endpoint.go:486] V1Alpha1 Restore:defaultbackup-7c98c8b7-c8bf-4f6e-b2c3-03f7fd509f40 created for volume "pvc-9125a66d-667b-491d-8c95-ef9bd1180698" CSPI: cstor-disk-cspc-2d89
I1007 13:23:08.423570       1 restore_endpoint.go:486] V1Alpha1 Restore:defaultbackup-d71334cf-3740-4424-8e7b-f154a5316b4a created for volume "pvc-9125a66d-667b-491d-8c95-ef9bd1180698" CSPI: cstor-disk-cspc-46nl
I1007 13:23:13.429891       1 restore_endpoint.go:69] Got restore GET request
I1007 13:23:25.980573       1 v1alpha1_restore.go:60] Restore:defaultbackup-7c98c8b7-c8bf-4f6e-b2c3-03f7fd509f40 status is InProgress
I1007 13:23:31.001232       1 restore_endpoint.go:69] Got restore GET request
I1007 13:23:32.608636       1 v1alpha1_restore.go:60] Restore:defaultbackup-7c98c8b7-c8bf-4f6e-b2c3-03f7fd509f40 status is InProgress
I1007 13:23:40.947070       1 restore_endpoint.go:69] Got restore GET request
I1007 13:23:44.245559       1 v1alpha1_restore.go:60] Restore:defaultbackup-7c98c8b7-c8bf-4f6e-b2c3-03f7fd509f40 status is InProgress
I1007 13:23:49.254671       1 restore_endpoint.go:69] Got restore GET request
I1007 13:23:49.341722       1 v1alpha1_restore.go:60] Restore:defaultbackup-7c98c8b7-c8bf-4f6e-b2c3-03f7fd509f40 status is InProgress
I1007 13:23:54.342754       1 restore_endpoint.go:69] Got restore GET request
I1007 13:23:55.318231       1 v1alpha1_restore.go:60] Restore:defaultbackup-7c98c8b7-c8bf-4f6e-b2c3-03f7fd509f40 status is InProgress
I1007 13:24:00.319726       1 restore_endpoint.go:69] Got restore GET request
I1007 13:24:00.341778       1 v1alpha1_restore.go:60] Restore:defaultbackup-7c98c8b7-c8bf-4f6e-b2c3-03f7fd509f40 status is InProgress
I1007 13:24:05.342677       1 restore_endpoint.go:69] Got restore GET request
I1007 13:24:05.345903       1 v1alpha1_restore.go:60] Restore:defaultbackup-7c98c8b7-c8bf-4f6e-b2c3-03f7fd509f40 status is Done

Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
@sonasingh46 sonasingh46 merged commit 9f7f39e into openebs-archive:master Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants