-
Notifications
You must be signed in to change notification settings - Fork 382
Make node_id required in GetNodeIDResponse #148
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
Make node_id required in GetNodeIDResponse #148
Conversation
csi.proto
Outdated
// know which node the volume was previously used. The Plugin SHOULD | ||
// return an Error if this is not supported. | ||
// The ID of the node. This field is REQUIRED. The CO SHALL set this | ||
// field to match the node ID returned by `GetNodeID`. |
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.
We killed a use case here by making this REQUIRED: a CO may intentionally leave this field blank to indicate to the plugin that the volume should be unpublished from every node in the cluster. Is killing that use case really our intent here?
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.
Yeah. I think we deliberately made this field optional to capture the case where the CO just want to detach the volume from any node. I still believe this is useful in some reconciliation scenarios.
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.
Ack. I'll restore this then.
csi.proto
Outdated
// The ID of the node as understood by the CO which MAY be returned by | ||
// the SP in the GetNodeIDResponse if the SP does not implement a | ||
// custom node naming scheme and understands (or internally maps) the | ||
// CO's node id. |
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.
REQUIRED? OPTIONAL?
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.
Will add.
spec.md
Outdated
// The API version assumed by the CO. This is a REQUIRED field. | ||
Version version = 1; | ||
// The ID of the node as understood by the CO which MAY be returned by |
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.
cc @akutz
This is still controversial. Can we make this change a separate PR?
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.
Done. Will pull this in to a separate PR.
PTAL |
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
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.
minor comment, otherwise lgtm
// `ControllerPublishVolume`. | ||
// The ID of the node as understood by the SP which SHALL be used by | ||
// CO in subsequent `ControllerPublishVolume`. | ||
// This is a REQUIRED field. |
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.
suggestion: This is an OPTIONAL field that is REQUIRED only if the controller advertises the PUBLISH_UNPUBLISH_VOLUME
capability.
because not implementing the call means that GetNodeIDResponse is empty, and that violates the REQUIRED semantics as currently documented.
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.
node_id
a required field in theGetNodeIDResponse
if the plugin hasPUBLISH_UNPUBLISH_VOLUME
controller capability.node_id
a required field in theControllerPublishVolume
andControllerUnpublishVolume
calls.node_id
inGetNodeIdReqeust
so that SP's that don't have their own custom internal naming scheme do not have to implement complicated logic to figure out the node name.Fixes #121