-
Notifications
You must be signed in to change notification settings - Fork 18
Use base snapshot CSI handle instead of name in GetMetadataRequest #180
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
Conversation
bda429d
to
fa1d7c5
Compare
|
||
stringFlag(&args.Namespace, "namespace", "n", "", "The Namespace containing the VolumeSnapshot objects.") | ||
stringFlag(&args.SnapshotName, "snapshot", "s", "", "The name of the VolumeSnapshot for which metadata is to be displayed.") | ||
stringFlag(&args.PrevSnapshotID, "previous-snapshot-id", "P", "", "The CSI handle of an earlier VolumeSnapshot against which changed block metadata is to be displayed.") |
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.
Just capital "P" maybe a bit confusion, how about p-id or something else?
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.
The P
is the short flag and was chosen because the short flag for the name is p
. The long flag is -previous-snapshot-id
.
We're building
but testing with
Can you please fix |
Can you please take a look at adding tests for previous snapID usage too in the following ?
|
fa1d7c5
to
0ec0c58
Compare
I will try, as soon as I make some progress in understanding the test and making it work. I presume I can use something like this to extract the snapshot handle:
and then repeat the diff with the handle as a parameter instead of I will also have to modify the verifier command to take the new flag. |
d873aef
to
fdc6de4
Compare
GetMetadataRequest Kubernetes SnapshotMetadata API. The iterator package now accepts both the previous snapshot name or CSI handle with preference given to the handle.
fdc6de4
to
aa1a285
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.
Looks good to me,
I'll let @PrasadG193 review too.
Looks good to me as well. |
// request is made, and take that into consideration in its snapshot retention policy. | ||
// This field is REQUIRED. | ||
string base_snapshot_name = 3; | ||
string base_snapshot_id = 3; |
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.
- Just to confirm, are we not supporting volume ID in GetMetadataAllocatedRequest?
- Does it make sense to also change
target_snapshot_name
totarget_snapshot_id
to make it uniform? Using ID for one and name for other could be confusing for users. Was this discussed and decided in the community meeting?
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.
- Just to confirm, are we not supporting volume ID in GetMetadataAllocatedRequest?
You meant snapshot ID in GetMetadataAllocatedRequest? That is not required because this API only needs one snapshot which is just created and it does not need to be retained for a long time.
The main reason for changing the base_snapshot_name to base_snapshot_id is that so we don't require a storage system to retain a snapshot for a long time which may result in performance degradation on some storage systems, defeating the purpose of using CBT.
- Does it make sense to also change target_snapshot_name to target_snapshot_id to make it uniform? Using ID for one and name for other could be confusing for users. Was this discussed and decided in the community meeting?
That's a good point. If we do that, it means the backup vendor will create a VolumeSnapshot first and then retrieve the snapshot_id instead of letting the External Snapshot Metadata sidecar do that.
I'm fine either way.
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.
Discussed this at DP WG meeting today. @bswartz mentioned that if we change target_snapshot_name to target_snapshot_id, that will affect the rbac control.
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.
Ok, that makes sense. We don't have any other info to validate the auth otherwise
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
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: carlbraganza, prasadg-veeam, PrasadG193, Rakshith-R 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 |
Replaced base_snapshot_name with base_snapshot_id in the GetMetadataRequest Kubernetes SnapshotMetadata API.
The iterator package now accepts both the previous snapshot name or CSI handle with preference given to the handle.
What type of PR is this?
/kind api-change
What this PR does / why we need it:
There was an API change requested in Issue 165, and approved by the SIG-Storage DP WG.
Which issue(s) this PR fixes:
Fixes #165
Special notes for your reviewer:
Does this PR introduce a user-facing change?: