-
Notifications
You must be signed in to change notification settings - Fork 2k
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
CSI: create volume capability validation #10224
CSI: create volume capability validation #10224
Conversation
d536bfb
to
7a73906
Compare
The CSI specification requires that we validate a list of `Capability` (access mode + accessibility) when we create volume, but the existing volume registration workflow incorrectly validates a single capability. The specific capability required by a volume claim is checked at the time we make the claim, so remove the check for `AttachmentMode`/`AcccessMode`.
In order to support new controller RPCs, we need to fingerprint volume capabilities in more detail and perform controller RPCs only when the specific capability is present. This fixes a bug in Ceph support where the plugin can only suport create/delete but we assume that it also supports attach/detach.
The HTTP test to create CSI volumes depends on having a controller plugin to talk to, but the test was using a node-only plugin, which allows it to silently ignore the missing controller.
34c76a4
to
2f155b1
Compare
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; left minor suggestions
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. A couple of minor questions but this looks great.
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Fix a collection of validation-related issues for CSI volume creation that I discovered while getting things tested end-to-end.
CSI: add missing
structs.CSIVolume
fields toapi.CSIVolume
CSI: volume creation/registration should not validate attachment. The CSI specification requires that we validate a list of
Capability
(access mode + accessibility) when we create volume, but the existing volumeregistration workflow incorrectly validates a single capability. The specific capability required by a volume claim is checked at the time we make the claim, so remove the check for
AttachmentMode
/AccessMode
.CSI: fingerprint detailed controller capabilities. In order to support new controller RPCs, we need to fingerprint volume capabilities in more detail and perform controller RPCs only when the specific capability is present. This fixes a bug in Ceph support where the plugin can only support create/delete but we assume that it also supports attach/detach.
CSI: the HTTP test to create CSI volumes depends on having a controller plugin to talk to, but the test was using a node-only plugin, which allows it to silently ignore the missing controller.
Note for reviewers:
csi-create-volume
branch: CSI: volume creation #10165