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 capability for ControllerPublishVolume.readonly field #310

Merged

Conversation

saad-ali
Copy link
Member

@saad-ali saad-ali commented Nov 8, 2018

Closes #293

@saad-ali
Copy link
Member Author

saad-ali commented Nov 8, 2018

Will change this per #293 (comment)

@saad-ali saad-ali changed the title Clarify ControllerPublishVolume readonly field Add capability for ControllerPublishVolume.readonly field Nov 9, 2018
@saad-ali
Copy link
Member Author

saad-ali commented Nov 9, 2018

@julian-hj @jieyu per our discussion, I changed this from a comment to a new capability.

// REQUIRED.
// Whether to publish the volume in readonly mode. This field MUST be
// specified only if SP has PUBLISH_READONLY controller capability.
// This is a REQUIRED field.
bool readonly = 4;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is making readonly flag optional simpler?

Copy link
Member Author

Choose a reason for hiding this comment

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

Problem with making it optional is that the CO doesn't know when to set it. If CO sets it to true and a plugin doesn't support it, what happens? Consider the case where the CO uses the same flag for both ControllerPublish and NodePublish readonly -- we don't want to get in to a case where the CO thinks a volume is readonly but it's not.

csi.proto Outdated
// Whether to publish the volume in readonly mode. This field is
// REQUIRED.
// Whether to publish the volume in readonly mode. This field MUST be
// specified only if SP has PUBLISH_READONLY controller capability.
Copy link
Member

Choose a reason for hiding this comment

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

This field MUST be REQUIRED specified only if conflicts with This is a REQUIRED field.

We should say that if the SP does not have PUBLISH_READONLY capability, the CO will set this field to false.

@saad-ali saad-ali force-pushed the readonlyOptional branch 2 times, most recently from b1efdca to 1f2ff53 Compare November 9, 2018 19:47
@saad-ali
Copy link
Member Author

saad-ali commented Nov 9, 2018

Feedback addressed PTAL @jieyu

@saad-ali saad-ali merged commit aa80a63 into container-storage-interface:master Nov 9, 2018
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.

4 participants