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 Topology for Snapshot #274

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

xing-yang
Copy link
Contributor

@xing-yang xing-yang commented Oct 8, 2018

This PR adds topology requirements for snapshots.

Closes #241

csi.proto Outdated
// Given a volume or snapshot should be accessible from TWO zones
// (because an opaque parameter in CreateVolumeRequest, for example,
// specifies the volume is accessible from two zones, aka
// synchronously replicated), and
Copy link

Choose a reason for hiding this comment

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

This comment says that specifying the volume is accessible from two zones is equivalent to synchronous replication. But per the discussion in the meeting, I don't believe that is necessarily true - replication behavior is out of scope, e.g. implementers may replicate to satisfy accessibility requirements but are not required to.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with this. It's important to state that while snapshot replication MAY take place in order to satisfy accessibility requrements, clients MUST NOT assume that accessibility has any relation to replication, and if replication is desired, it should be requested in a different manner. Today, that means using opaque parameters to request replication.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reworded the comments.

@xing-yang xing-yang force-pushed the topology branch 3 times, most recently from a8448c4 to 0dbe605 Compare October 15, 2018 19:42
@jdef
Copy link
Member

jdef commented Oct 18, 2018

PSA: As a general rule, please don't squash commits once reviewing has started. Commits can always be squashed at the end. This way reviewers that are following along can more easily review changes made over time to the PR. Thanks!

spec.md Outdated
// ACCESSIBILITY_CONSTRAINTS plugin capability, the SP MAY choose
// where the provisioned volume is accessible from.
// VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability, the SP MAY
// choose where the provisioned volume is accessible from.
TopologyRequirement accessibility_requirements = 7;
Copy link
Member

Choose a reason for hiding this comment

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

Since a volume MAY be created from a snapshot, perhaps with specific workload placement in mind, it seems that the interesting/valid set of topologies (for on-demand workload placement) MAY be the intersection of the topologies of the (a) candidate nodes; (b) snapshots, and; (c) volume accessibility requirements specified here. Is this actually the case, or am I over-thinking this?

If my thinking is in line with the spirit of what this PR is trying to accomplish, then it would be great to see a bit more description fleshed out in the spec somewhere about the interaction between these three object types and their topologies.

Copy link
Member

Choose a reason for hiding this comment

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

In other words, simply adding "or snapshot" to the existing set of documentation (as has been done throughout the PR here) probably isn't sufficient.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When creating a volume from snapshot, SP will look at accessibility_requirements in CreateVolumeRequest and accessible_topology in CreateSnapshotResponse, and find an intersection of the two. This will be reflected in accessible_topology of CreateVolumeResponse.

Regarding accessibility for a node, the existing comment about accessible_topology in NodeGetInfoResponse says “COs MAY use this information along with the topology information returned in CreateVolumeResponse to ensure that a given volume is accessible from a given node when scheduling workloads.” This comment is still true for creating volume from snapshot.

I can add this to the spec.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Spec updated with this clarification.

spec.md Outdated
// COs MAY use this information along with the topology information
// returned in CreateVolumeResponse to ensure that a given volume is
// accessible from a given node when scheduling workloads.
// returned in CreateVolumeResponse CreateSnapshotResponse to ensure
Copy link
Member

Choose a reason for hiding this comment

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

missing "or" here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will fix it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Member

@saad-ali saad-ali left a comment

Choose a reason for hiding this comment

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

We need to clarify the use cases for this. A snapshot is not accessible from a node like a volume is. Therefore a lot of this doesn't make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants