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

Modification of names used for credentials #168

Merged
merged 1 commit into from
Feb 1, 2018
Merged

Modification of names used for credentials #168

merged 1 commit into from
Feb 1, 2018

Conversation

sbezverk
Copy link
Contributor

@sbezverk sbezverk commented Jan 17, 2018

This PR makes credentials related fields more intuitive and less confusing.
Closes: #140

@jdef
Copy link
Member

jdef commented Jan 17, 2018

Thanks for the PR. Related to #140 ?

Also, please don't change generated files manually. Instead the root-level spec.md should be changed, and then run make to regenerate downstream files.

@sbezverk
Copy link
Contributor Author

@jdef You are right, it is related to #140 I just make it a little more intuitive by using controller_credentials and node_credentials instead of just credentials as suggested.

@sbezverk
Copy link
Contributor Author

@jdef @saad-ali Any hints way check is failing?

@jdef
Copy link
Member

jdef commented Jan 17, 2018

@sbezverk I expect to see 3 files changed, 2 of them are for generated files (csi.proto and the golang bindings (pb.go file)) and 1 file is manually altered (the changes made to spec.md). After making changes to spec.md, run make and it will generate the other files for you.

@sbezverk
Copy link
Contributor Author

/assign @saad-ali

spec.md Outdated
// sensitive and MUST be treated as such (not logged, etc.) by the CO.
// This field is OPTIONAL.
map<string, string> user_credentials = 7;
map<string, string> node_credentials = 7;
Copy link
Member

Choose a reason for hiding this comment

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

As discussed in #140, NodePublishVolume might be called one per workload by a CO. Calling it node_credentials makes it sound like the credentials are for the entire node.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jdef before you had user_credentials which made sound like the same credential is used for everything.
controller_credential and node_credential are per function, the content of it depends on the usage of corresponding function controller or node. Making them even more granular is an option but imho is an overkill.

spec.md Outdated
// sensitive and MUST be treated as such (not logged, etc.) by the CO.
// This field is OPTIONAL.
map<string, string> user_credentials = 6;
map<string, string> controller_credentials = 6;
Copy link
Member

Choose a reason for hiding this comment

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

It's possible that the credentials used for CreateVolume/DestroyVolume are different than those used for ControllerPublishVolume/ControllerUnpublishVolume. Calling them controller_credentials makes it sounds like they should be the same. I think we either follow the suggestion in #140, or just name it as "credentials".

Copy link
Member

Choose a reason for hiding this comment

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

I agree, let's go with just credentials or create_credentials, delete_credentials, controller_publish_credentials, etc.

spec.md Outdated
// sensitive and MUST be treated as such (not logged, etc.) by the CO.
// This field is OPTIONAL.
map<string, string> user_credentials = 6;
map<string, string> controller_credentials = 6;
Copy link
Member

Choose a reason for hiding this comment

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

I agree, let's go with just credentials or create_credentials, delete_credentials, controller_publish_credentials, etc.

@sbezverk
Copy link
Contributor Author

@saad-ali done changes with slight modification, since controller and node has publish/unpublish calls, I suggest to use the following model: controller_create_credentials, controller_publish_credentials, node_publish_credentials etc. In this case there is no confusion which credentials are used for what purpose.

@saad-ali
Copy link
Member

This LGTM

@jieyu @jdef ?

@sbezverk
Copy link
Contributor Author

@saad-ali Could you mark your review as completed then? thanks a lot for reviewing.

Copy link
Member

@jieyu jieyu left a comment

Choose a reason for hiding this comment

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

LGTM

spec.md Outdated
}

message NodeUnpublishVolumeResponse {}
```

##### NodeUnpublishVolume Errors

If the plugin is unable to complete the NodeUnpublishVolume call successfully, it MUST return a non-ok gRPC code in the gRPC status.
If the plugin is unable to
Copy link
Member

Choose a reason for hiding this comment

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

please undo this seemingly unintentional change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank you for catching it, fixed.

@jdef jdef merged commit 2669bc1 into container-storage-interface:master Feb 1, 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