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

spec: Align volume validation with creation. #271

Conversation

jdef
Copy link
Member

@jdef jdef commented Sep 27, 2018

THIS IS A BREAKING CHANGE.

@jdef jdef requested review from jieyu and saad-ali September 27, 2018 18:01
@jdef jdef added this to the v1.0 milestone Sep 28, 2018
csi.proto Outdated Show resolved Hide resolved
@saad-ali saad-ali added the breaking-change Breaks backwards compat label Oct 3, 2018
@jdef
Copy link
Member Author

jdef commented Oct 3, 2018

TODO: add secrets, storage backend might need them to execute validation for a pre-existing volume

@jdef
Copy link
Member Author

jdef commented Oct 18, 2018

@jieyu @saad-ali @julian-hj @ddebroy PTAL

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.

I thought about this some more.

My understanding is that ValidateVolumeCapabilities is used to verify a pre-provisioned volume. That means that the volume already exists, and the CO wants to validate its assumptions to verify it has the correct information for how to access it.

If that is the case, the fields in ValidateVolumeCapabilitiesRequest should be similar to the fields returned in the CreateVolumeResponse (a description of a newly created volume) rather then the CreateVolumeRequest (a set of requirements for how to provision a new volume).

For example, the topology field should be repeated Topology accessible_topology = 5; not TopologyRequirement accessibility_requirements. Because we are trying to validate our assumptions about a (presumably) existing volume (it is accessible from all the specified accessible_topology). We are NOT trying to verify that it is possible to create a NEW volume with these topology requirements.

Thoughts?

csi.proto Show resolved Hide resolved
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.

Spoke with @jieyu. My understanding of the purpose of this call was different. Jie will talk to James.

Copy link
Member Author

@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.

Discussed w/ @jieyu and it sounds like we're aligned on this PR being mostly correct. There was some concern about "parameters" missing from somewhere .. but that's not very clear to me since it's part of this API already. I also see the comment about explicitness that I don't understand.

@saad-ali can you elaborate?

csi.proto Show resolved Hide resolved
@jdef jdef force-pushed the align_validation_with_creation branch from d784d24 to 1df9624 Compare November 6, 2018 22:01
spec.md Outdated Show resolved Hide resolved
spec.md Show resolved Hide resolved
James DeFelice added 7 commits November 7, 2018 19:52
THIS IS A BREAKING CHANGE.

* ValidateVolumeCapabilitiesRequest accepts the same parameters and
  topology requirements as CreateVolumeRequest.

* ValidateVolumeCapabilitiesResponse is forward-compatible between newer
  COs (clients) and older plugins (servers).

* fixes container-storage-interface#242
Amended wording in the spec that referred to the field `supported` that
no longer exists as of this PR and has been effectively replaced with
`confirmed`.
Since `parameters` and `volume_attributes` are complex fields the
`Confirmed` message of `ValidateVolumeCapabilitiesResponse` has been
extended to report those map entries recognized by the plugin.
Current thinking is that topology of a volume can be discovered via the
ListVolumes RPC of the controller and is not strictly required here. We
can always add it back later if needed.
@jdef jdef force-pushed the align_validation_with_creation branch from d175f5c to 3664c5c Compare November 7, 2018 22:13
@jdef
Copy link
Member Author

jdef commented Nov 7, 2018

addressed remaining feedback and rebased to master

csi.proto Outdated Show resolved Hide resolved
@saad-ali
Copy link
Member

saad-ali commented Nov 8, 2018

LGTM

@saad-ali saad-ali merged commit 72124ad into container-storage-interface:master Nov 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Breaks backwards compat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider making ValidateVolumeCapabilitesRequest align with CreateVolumeRequest
3 participants