-
Notifications
You must be signed in to change notification settings - Fork 226
Implement CSI SnapshotMetadata service #569
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
Implement CSI SnapshotMetadata service #569
Conversation
Signed-off-by: Prasad Ghangal <[email protected]>
Skipping CI for Draft Pull Request. |
Implement GetMetadataAllocated RPC handler Signed-off-by: Prasad Ghangal <[email protected]>
2835d54
to
3b2b102
Compare
Signed-off-by: Prasad Ghangal <[email protected]>
Signed-off-by: Prasad Ghangal <[email protected]>
/assign |
Signed-off-by: Prasad Ghangal <[email protected]>
This is a new feature. Please add a release note. |
Signed-off-by: Prasad Ghangal <[email protected]>
Signed-off-by: Prasad Ghangal <[email protected]>
Can you add your testing steps? |
hey @xing-yang , @PrasadG193 is on vacation and will be back thursday. He had developed a client to test the new RPCs https://github.com/PrasadG193/external-snapshot-metadata-client We are creating a gh action that adds simple e2e
Sample run https://github.com/Rakshith-R/external-snapshot-metadata/actions/runs/12163453092/job/33922692908 |
Signed-off-by: Prasad Ghangal <[email protected]>
Signed-off-by: Prasad Ghangal <[email protected]>
@xing-yang I have documented complete test plan along with steps to deploy csi driver with external-snapshot-metadata here - https://gist.github.com/PrasadG193/1fab082f03bbdb7db25a41ed17b7e7c1 |
LGTM! @PrasadG193 |
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.
Overall this looks pretty good. There are some inefficient bits of code but for a proof-of-concept it seems fine. I found one bug with error handling.
Signed-off-by: Prasad Ghangal <[email protected]>
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
Signed-off-by: Prasad Ghangal <[email protected]>
// validate snapshot-metadata-type arg block type | ||
bt, ok := csi.BlockMetadataType_value[*snapshotMetadataBlockType] | ||
if !ok { | ||
fmt.Printf("invalid snapshot-metadata-block-type passed, please pass one of the - FIXED_LENGTH, VARIABLE_LENGTH") |
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.
nit: use upper case for beginning of the error/exit message to conform with other error messages in the file. And probably rephase "please pass one of the -..." to "valid types are FIXED_LENGTH, VARIABLE_LENGTH".
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
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bswartz, PrasadG193, xing-yang 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 |
CSI SnapshotMetadata service has been implemented for csi-driver-host-path PR: kubernetes-csi/csi-driver-host-path#569 Signed-off-by: Praveen M <[email protected]>
CSI SnapshotMetadata service has been implemented for csi-driver-host-path PR: kubernetes-csi/csi-driver-host-path#569 Signed-off-by: Praveen M <[email protected]>
CSI SnapshotMetadata service has been implemented for csi-driver-host-path PR: kubernetes-csi/csi-driver-host-path#569 Signed-off-by: Praveen M <[email protected]>
CSI SnapshotMetadata service has been implemented for csi-driver-host-path PR: kubernetes-csi/csi-driver-host-path#569 Signed-off-by: Praveen M <[email protected]>
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR implements SnapshotMetadata service from the CSI specs. This service in combination with external-snapshot-metadata will be used to compare and query changed block metadata between two snapshots.
Right now, the service will be disabled by default till
external-snapshot-metadata
alpha is release.The changes in deploy script to add
external-snapshot-metadata
sidecar will be added after alpha release.NOTE
This is a sample implementation of SnapshotMetadata intended to be used for demo and CI testing purpose only.
This should not be used in production or as an example about how to write a real driver.
Test plan
Complete test plan is documented at - https://gist.github.com/PrasadG193/1fab082f03bbdb7db25a41ed17b7e7c1
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: