-
Notifications
You must be signed in to change notification settings - Fork 554
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
Only publish if access type is 'mount', not 'block' #164
Conversation
/hold |
/retest |
/test pull-aws-efs-csi-driver-e2e |
/lgtm |
think I need to rebase. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wongma7 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
Is this a bug fix or adding new feature? fix
What is this PR about? / Why do we need it? It's possible for a user to specify an EFS volume in their pod's
volumeDevices
in which case kubelet will callMapVolume
on the volume and pass access type 'block' in NodePublish. Since it doesn't make sense to consume EFS as a block volume, the driver should return a clear error in this case instead of unnecessarily mounting the volume.This is exercised by the test case "should fail to create pod by failing to mount volume." Right now the driver passes the test because AttachFileDevice fails and then subsequent mounts fail with 'mount already exists' errors. Ideally the driver should pass the test by "fast failing" and there should be a FailedMapVolume event.
What testing is done? FailedMapVolume shows up on the pod: