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

Only publish if access type is 'mount', not 'block' #164

Merged
merged 1 commit into from
Jun 25, 2020

Conversation

wongma7
Copy link
Contributor

@wongma7 wongma7 commented May 12, 2020

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 call MapVolume 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:

  Warning  FailedMapVolume  2s (x8 over 66s)  kubelet, ip-192-168-115-67.us-west-2.compute.internal  MapVolume.SetUp failed for volume "pvk29ck" : kubernetes.io/csi: blockMapper.publishVolumeForBlock failed: rpc error: code = InvalidArgument desc = Volume capability access type must be mount

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 12, 2020
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 12, 2020
@wongma7
Copy link
Contributor Author

wongma7 commented May 12, 2020

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 12, 2020
@wongma7
Copy link
Contributor Author

wongma7 commented May 12, 2020

/retest
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 12, 2020
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 12, 2020
@wongma7
Copy link
Contributor Author

wongma7 commented May 12, 2020

/test pull-aws-efs-csi-driver-e2e

@nckturner
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 24, 2020
@wongma7
Copy link
Contributor Author

wongma7 commented Jun 25, 2020

think I need to rebase.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 25, 2020
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 25, 2020
@nckturner
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 25, 2020
@k8s-ci-robot k8s-ci-robot merged commit 8cfff11 into kubernetes-sigs:master Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants