-
Notifications
You must be signed in to change notification settings - Fork 566
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
Revise awscredsuri validation to prefix check #762
Conversation
pkg/driver/node.go
Outdated
@@ -165,7 +165,7 @@ func (d *Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolu | |||
} | |||
} | |||
|
|||
if f == "awscredsuri" { | |||
if strings.HasPrefix(f, "awscredsuri") { | |||
klog.Warning("awscredsuri mount option is not supported by efs-csi-driver.") | |||
return nil, nil |
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.
i know this was already here but it doesnt look right, return nil nil? no response, no error? should it return nil ,err?
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.
Also, return nil nil causes FailedMount.
Warning FailedMount 14s kubelet Unable to attach or mount volumes: unmounted volumes=[persistent-storage], unattached volumes=[kube-api-access-9c7nq persistent-storage]: timed out waiting for the condition
Warning FailedMount 9s (x9 over 2m17s) kubelet MountVolume.SetUp failed for volume "efs-pv" : rpc error: code = Internal desc = grpc: error while marshaling: proto: Marshal called with nil
0924b0f
to
5ed6973
Compare
5ed6973
to
17d318d
Compare
/lgtm |
@rsumukha: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lgtm |
@wangnyue: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Ashley-wenyizha, wangnyue 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?
Revise awscredsuri validation to prefix check
What is this PR about? / Why do we need it?
What testing is done?
Manual test result - driver successfully rejected
awscredsuri
mount option and efs-utils is still able to mount success with this option filtered out