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

Add csi snapshot data mover doc #6637

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

Lyndon-Li
Copy link
Contributor

Add CSI snapshot data movement doc

@github-actions github-actions bot added Documentation Website non-docs changes for the website labels Aug 10, 2023
@Lyndon-Li Lyndon-Li force-pushed the csi-snapshot-data-mover-doc branch from bb4f222 to 2b71d97 Compare August 10, 2023 11:47
@Lyndon-Li Lyndon-Li force-pushed the csi-snapshot-data-mover-doc branch 2 times, most recently from 5eee0fc to 704f0f5 Compare August 10, 2023 11:55
@codecov-commenter
Copy link

codecov-commenter commented Aug 10, 2023

Codecov Report

Merging #6637 (1adf842) into main (6997e4a) will increase coverage by 0.07%.
Report is 107 commits behind head on main.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #6637      +/-   ##
==========================================
+ Coverage   60.36%   60.44%   +0.07%     
==========================================
  Files         239      242       +3     
  Lines       25499    26023     +524     
==========================================
+ Hits        15392    15729     +337     
- Misses       9036     9190     +154     
- Partials     1071     1104      +33     

see 39 files with indirect coverage changes

@Lyndon-Li Lyndon-Li force-pushed the csi-snapshot-data-mover-doc branch 2 times, most recently from bfa944b to 8c08c2d Compare August 10, 2023 11:59
@Lyndon-Li Lyndon-Li marked this pull request as ready for review August 10, 2023 12:00
@Lyndon-Li Lyndon-Li force-pushed the csi-snapshot-data-mover-doc branch from 8c08c2d to 2250378 Compare August 10, 2023 12:13
Copy link
Contributor

@shawn-hurley shawn-hurley left a comment

Choose a reason for hiding this comment

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

This looks good to me after the first glance.

site/content/docs/main/csi-snapshot-data-movement.md Outdated Show resolved Hide resolved
@Lyndon-Li Lyndon-Li force-pushed the csi-snapshot-data-mover-doc branch from 2250378 to 6d37203 Compare August 22, 2023 02:27
@Lyndon-Li Lyndon-Li force-pushed the csi-snapshot-data-mover-doc branch from 6d37203 to dd379e2 Compare August 22, 2023 07:26
blackpiglet
blackpiglet previously approved these changes Aug 22, 2023
@Lyndon-Li Lyndon-Li force-pushed the csi-snapshot-data-mover-doc branch 2 times, most recently from 165d2ff to c5eadc7 Compare August 23, 2023 03:59
blackpiglet
blackpiglet previously approved these changes Aug 23, 2023
@Lyndon-Li
Copy link
Contributor Author

@sseago @shubham-pampattiwar
Could you help to review this PR?

Copy link
Collaborator

@shubham-pampattiwar shubham-pampattiwar left a comment

Choose a reason for hiding this comment

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

Overall looks good ! Added a few comments/nits here and there. Thank you @Lyndon-Li !!

site/content/docs/main/csi-snapshot-data-movement.md Outdated Show resolved Hide resolved
site/content/docs/main/csi-snapshot-data-movement.md Outdated Show resolved Hide resolved
site/content/docs/main/csi-snapshot-data-movement.md Outdated Show resolved Hide resolved
site/content/docs/main/csi-snapshot-data-movement.md Outdated Show resolved Hide resolved
site/content/docs/main/csi-snapshot-data-movement.md Outdated Show resolved Hide resolved
site/content/docs/main/csi-snapshot-data-movement.md Outdated Show resolved Hide resolved
site/content/docs/main/csi-snapshot-data-movement.md Outdated Show resolved Hide resolved
site/content/docs/main/csi-snapshot-data-movement.md Outdated Show resolved Hide resolved
@draghuram
Copy link
Contributor

I just started going through the doc but one thing that is missing is changes to "Backup" spec. The fields "snapshotMoveData" and "datamover" need to be added at https://velero.io/docs/main/api-types/backup/.

@Lyndon-Li Lyndon-Li force-pushed the csi-snapshot-data-mover-doc branch from 6f8167d to 801e40c Compare September 1, 2023 01:46
@Lyndon-Li Lyndon-Li force-pushed the csi-snapshot-data-mover-doc branch 2 times, most recently from 542981e to 5e3bd18 Compare September 6, 2023 03:42
@Lyndon-Li
Copy link
Contributor Author

The fields "snapshotMoveData" and "datamover" need to be added at https://velero.io/docs/main/api-types/backup/.

Done the changes. Added them for both backup and schedule api-types.

blackpiglet
blackpiglet previously approved these changes Sep 6, 2023
reasonerjt
reasonerjt previously approved these changes Sep 7, 2023
- CSI plugin first takes a CSI snapshot to the PVC by creating the `VolumeSnapshot` and `VolumeSnapshotContent`.
- CSI plugin checks if a data movement is required, if so it creates a `DataUpload` CR and then returns to Velero backup.
- Velero now is able to back up other resources, including other PVC objects.
- Velero backup periodically queries the data movement status from CSI plugin, the period is configurable through the Velero server parameter `--item-operation-sync-frequency`, by default it is 10s. On the call, CSI plugin turns to check the phase of the `DataUpload` CRs.
Copy link
Contributor

Choose a reason for hiding this comment

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

backup -> backup controller

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, thanks

- CSI plugin expects the same data mover for the backup to handle the `DataDownload` CR. If no data mover was configured for the backup, Velero built-in data mover will handle it.
- If the `DataDownload` CR does not reach to the terminal state with in the given time, the `DataDownload` CR will be cancelled. You can set the timeout value per backup through the same `--item-operation-timeout` parameter.

- Velero built-in data mover creates a volume with the same specification of the source volume.
Copy link
Contributor

Choose a reason for hiding this comment

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

Shall we stress that the volume creation is done via dynamic provision, i.e. it only creates the PVC and it has dependency on storageclass on the target cluster?

Copy link
Contributor Author

@Lyndon-Li Lyndon-Li Sep 7, 2023

Choose a reason for hiding this comment

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

We have mentioned how to configure the storage class on the target in section Configure storage class on target cluster.
I have rephrased the sentence in the same section as below:
On the other hand, Velero built-in data movement creates a PVC with the same specification as it in the source cluster and expects the volume to be provisioned similarly. For example, the same storage class should be working in the target cluster


### Cancellation

At present, Velero backup and restore doesn't support end to end cancellation that is launched by users.
Copy link
Contributor

Choose a reason for hiding this comment

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

But a user can patch a dataupload/datadownload CR's spec to cancel the action. Shall we also mention that in the doc?

Copy link
Contributor Author

@Lyndon-Li Lyndon-Li Sep 7, 2023

Choose a reason for hiding this comment

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

We don't intend to expose this approach to users officially -- when there are many datauploads/downloads in a backup/restore, users may not able to correctly take care of everyone of the datauploads/downloads, and an unexpected result may happen.
For example, a dataupload/datadownload is matched to a wrong backup/restore, as a result, the backup/restore will get to a ParitialFailed status unexpectedly.

For Velero side configurations mentioned above, the installation and configuration of node-agent may not be required.


## To back up
Copy link
Contributor

Choose a reason for hiding this comment

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

For both backup and restore, shall we mention how to monitor the progress of the data movement of each volume via velero backup/restore describe --details ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have suggested the other way to watch the progress:
You can see the phase changes as well as the data upload progress by watching the DataUpload CRs

This is the most direct way, while velero backup/restore describe --details needs to retrieve data from backup store and is not timely (we have discussed this problem and the possible fix during the Async Operation PR, but not fixed it yet).

@Lyndon-Li Lyndon-Li dismissed stale reviews from reasonerjt and blackpiglet via cba029b September 7, 2023 09:14
@Lyndon-Li Lyndon-Li force-pushed the csi-snapshot-data-mover-doc branch from 5e3bd18 to cba029b Compare September 7, 2023 09:14
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
@Lyndon-Li Lyndon-Li force-pushed the csi-snapshot-data-mover-doc branch from cba029b to 1adf842 Compare September 7, 2023 09:56
@ywk253100 ywk253100 merged commit a4b5b0a into vmware-tanzu:main Sep 8, 2023
kaovilai pushed a commit to kaovilai/velero that referenced this pull request Oct 2, 2023
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
kaovilai pushed a commit to kaovilai/velero that referenced this pull request Oct 2, 2023
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation has-changelog Website non-docs changes for the website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants