-
Notifications
You must be signed in to change notification settings - Fork 106
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 spec v1.1.0 #144
CSI spec v1.1.0 #144
Conversation
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
ll.WithField("snapshot_id", snapshot.GetSnapshotId()).Info("using snapshot as volume source") | ||
volumeReq.SnapshotID = snapshot.GetSnapshotId() | ||
if contentSource != nil && contentSource.GetSnapshot() != nil { | ||
snapshotID := contentSource.GetSnapshot().GetSnapshotId() |
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.
Should we validate that the snapshot ID is not empty? Not sure whether the API call below will return a NotFound
or some other status when passed an empty 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.
Good poing @adamwg. I think it'll be already validated but I'll make sure to test that as well.
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.
Fixed with: 46155ff
The new csi-test version detected this issue. The snapshot might be deleted and we wouldn't test it.
https://kubernetes.slack.com/archives/C8EJ01Z46/p1556001245131700 From @msau42: > we're actually planning to deprecate cluster-driver-registrar and not > release a version for 1.14. Instead we are recommending that vendors > just create the CSIDriver spec as part of the driver deployment > packaging. @lpabon is currently in the process of updating all the > documentation to reflect this
Make sure we catch it and return a proper error instead of relying on the API behavior.
@@ -790,6 +810,10 @@ func (d *Driver) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsReques | |||
return listResp, nil | |||
} | |||
|
|||
func (d *Driver) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error) { | |||
return nil, errors.New("not implemented yet") |
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.
Should this return codes.Unimplemented
rather than a generic go error?
cfg := &sanity.Config{ | ||
StagingPath: mntStageDir, | ||
TargetPath: mntDir, | ||
TargetPath: os.TempDir() + "/csi-target", |
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.
For the benefit of others who are curious about this change. https://github.com/kubernetes-csi/csi-test/blob/e1f2421c7f0a0cc7f9942fea1192392f253891db/pkg/sanity/sanity.go#L56-L58
This PR updates the CSI spec to
v1.1.0
and the sidecars to their respective largest versions.Vendoring the code separately is a breaking change, hence it had to be here. Each commit is self contained, to review, read them one by one.
v1.1.0
and the csi-test library tov2.0.0
v1.1.0
CSIDriver
becausecluster-driver-registrar
is deprecated and no longer will create it for us (CSINodeInfo and CSIDriver Controller Changes kubernetes/kubernetes#74283)v1.14