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 VolumeSnapshotDelta CSI RPCs #522

Closed

Conversation

ihcsim
Copy link

@ihcsim ihcsim commented Sep 19, 2022

Copy link
Member

@jdef jdef left a comment

Choose a reason for hiding this comment

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

Please provide more context in the description of this RPC. There's no need to regurgitate the KEP in its entirety, but it was difficult for me to understand the usefulness of this w/o reading through parts of the related KEP.

For example (and I'm struggling w/ how to phrase this next part, so please bear w/ me)..

Dataplane is out of scope of CSI - and at the same time, CSI has "publish" calls that feel very close to dataplane territory (maybe since mount operations can involve a bit of (meta)data xfer). This proposal is purely controlplane and folks w/o CBT experience may be left wondering how in the world a CO is supposed to make use of this metadata since there are no other CSI calls that point to the dataplane at all here. Its only half of the overall useful API surface area. Without going into k8s details, it may be useful for such readers if the docs here mentioned something about the dataplane API aspect (block transfer w/ respect to backups) and how it's the CO's job to facilitate access to the raw data.

spec.md Outdated Show resolved Hide resolved
spec.md Outdated Show resolved Hide resolved
spec.md Outdated Show resolved Hide resolved
spec.md Outdated
option (alpha_message) = true;

// The block logical offset on the volume. This field is REQUIRED.
uint64 offset = 1;
Copy link
Member

Choose a reason for hiding this comment

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

.. in bytes?

Copy link
Author

Choose a reason for hiding this comment

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

Not necessarily. E.g., the AWS EBS Direct API uses its own logical offset scheme.

spec.md Outdated Show resolved Hide resolved
CO MUST implement the specified error recovery behavior when it encounters the
gRPC error code.

| Condition | gRPC Code | Description | Recovery Behavior |
Copy link
Member

Choose a reason for hiding this comment

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

what if from/to snapshot id are swapped? are SPs required to accept a newer id in "from" and an older it in "to"? or is that considered a bad/invalid request?

Copy link
Author

Choose a reason for hiding this comment

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

The intent is to let the SP do the error handling, and CSI just relays the response back to the end users. Different SP might handle this differently.

spec.md Outdated Show resolved Hide resolved
Signed-off-by: Ivan Sim <[email protected]>
csi.proto Show resolved Hide resolved

| Condition | gRPC Code | Description | Recovery Behavior |
|-----------|-----------|-------------|-------------------|
| Target volume snapshot does not exist | 5 NOT_FOUND | Indicates that the target volume snapshot corresponding to the specified `to_snapshot_id` does not exist. | Caller MUST verify that the `to_snapshot_id` is correct and that the volume snapshot is accessible and has not been deleted before retrying with exponential back off. |
Copy link
Contributor

Choose a reason for hiding this comment

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

The base snapshot may not exist as well?

Copy link
Author

Choose a reason for hiding this comment

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

In that case, the delta between the first snapshot since volume creation and the target snapshot will be retrieved.

@xing-yang
Copy link
Contributor

This file is missing: lib/go/csi/csi.pb.go
It should be generated automatically.

// in the subsequent `ListSnapshotDeltas` call. This field is
// OPTIONAL. If not specified (zero value), it means there is no
// restriction on the number of entries that can be returned.
// The value of this field MUST NOT be negative.

Choose a reason for hiding this comment

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

if this value MUST NOT be negative, why not use an unsigned int?

Copy link
Author

Choose a reason for hiding this comment

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

This the convention used for other definitions of max_entries in the spec.

// in the subsequent `ListSnapshotDeltas` call. This field is
// OPTIONAL. If not specified (zero value), it means there is no
// restriction on the number of entries that can be returned.
// The value of this field MUST NOT be negative.

Choose a reason for hiding this comment

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

if this value MUST NOT be negative, why not use an unsigned int?


// The ID of the base snapshot handle to use for comparison. If
// not specified, return all changed blocks up to the target
// specified by snapshot_target. This field is OPTIONAL.

Choose a reason for hiding this comment

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

snapshot_target is not part of this message, I think you mean to_snapshot_id.

response to ensure data plane operations remain outside the scope of CSI. The
response payload MUST contain enough block location metadata for the end users
to retrieve the raw data blocks. The end users are responsbile for devising
their own transport and retrieval mechanism to access the raw data blocks.

Choose a reason for hiding this comment

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

Without an option to transport changed blocks, I am not sure how useful this is. Users would still need to talk to the specific SP directly, and that is exactly what CSI tries to prevent.

Copy link
Author

Choose a reason for hiding this comment

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

At this point, data path remains outside the scope of CSI. The data protection white paper describes a SP-agnostic data movement mechanism here. Our observation is that different providers have different data movement implementation, which makes coming up with generic APIs challenging.

@ihcsim
Copy link
Author

ihcsim commented Aug 18, 2023

Superseded by #551.

@ihcsim ihcsim closed this Aug 18, 2023
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.

5 participants