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

ebs.csi.aws.com/throughput annotation for volumemodifier sidecar #1656

Closed
jclegras opened this issue Jun 21, 2023 · 5 comments · Fixed by #1667
Closed

ebs.csi.aws.com/throughput annotation for volumemodifier sidecar #1656

jclegras opened this issue Jun 21, 2023 · 5 comments · Fixed by #1667
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@jclegras
Copy link

/kind bug

What happened?

When I add the annotation ebs.csi.aws.com/throughput: 127 to a PVC (you have to enable the volumemodifier sidecar first), I receive an error from ebs-csi controller:

ebs-csi-controller-85dd68f7b7-2kg26 ebs-plugin ebs-csi-controller-85dd68f7b7-2kg26      rpc error: code = Internal desc = Could not modify volume "<volume-id>": unable to modify AWS volume "<volume-id>": InvalidParameterValue: Invalid input: Must specify at least one of size, type, iops, throughput or multi-attach.
ebs-csi-controller-85dd68f7b7-2kg26 volumemodifier ebs-plugin I0619 14:21:19.361322       1 connection.go:201] GRPC error: rpc error: code = Internal desc = Could not modify volume "<volume-id>": unable to modify AWS volume "<volume-id>": InvalidParameterValue: Invalid input: Must specify at least one of size, type, iops, throughput or multi-attach.
                status code: 400, request id: <request-id>

What you expected to happen?

No error and the volume has been modified accordingly to reflect the new value for throughput

How to reproduce it (as minimally and precisely as possible)?

  • EKS cluster and driver installed as an add-on
  • Install controller with volumemodifier enabled
    {"controller":{"volumeModificationFeature":{"enabled":true}}}
  • k annotate pvc <my-pvc> 'ebs.csi.aws.com/throughput'=126
  • Then you can kubectl describe the pvc to see the error or ebs-csi-controller logs (you can even increase the log level for this sidecar only)

Anything else we need to know?:

We managed to make it work thanks to the code
Actually you're expecting two annotations when we want to change the throughput value:

'ebs.csi.aws.com/throughput'=<my-value-int>
AND
'ebs.csi.aws.com/volumeType'=gp3

The condition is here: rdpsin@1560d54#diff-d7ef58b21290a74508c38ca5fdcd104ca5d098820cfac0681ba5415c9820c91dR477

Without this second annotation, throughput is not set and AWS side, the request received is as such:

 "errorCode": "Client.InvalidParameterValue",

    "errorMessage": "Invalid input: Must specify at least one of size, type, iops, throughput or multi-attach.",

    "requestParameters": {

        "ModifyVolumeRequest": {

            "VolumeId": "<volume-id>"

        }

    },

Instead of:

"requestParameters": {

        "ModifyVolumeRequest": {

            "VolumeId": "<volume-id>",

            "Throughput": 126

        }

    },

To sum up, we don't know what you had in mind:
If it's on purpose (two annotations to change the throughput), then the doc should be modified accordingly
Otherwise, we may get rid of the condition that checks volume type and let AWS SDK raises an error if we are not in GP3 volume type, that way we only need one annotation (throughput)
Or since we have the volumeId, we could issue an api call to describe the volume and checks the type but it's one additional API call

Environment

  • Kubernetes version (use kubectl version): Server Version: version.Info{Major:"1", Minor:"27+", GitVersion:"v1.27.1-eks-2f008fe", GitCommit:"abfec7d7e55d56346a5259c9379dea9f56ba2926", GitTreeState:"clean", BuildDate:"2023-04-14T20:40:28Z", GoVersion:"go1.20.3", Compiler:"gc", Platform:"linux/amd64"}

  • Driver version: v1.19.0-eksbuild.2

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 21, 2023
@hanyuel
Copy link
Contributor

hanyuel commented Jun 21, 2023

Hi @jclegras , the condition checking volume type should not be necessary. So we can remove it.

@Indresh2410
Copy link
Contributor

Hi @jclegras / @hanyuel . Would like to work on the above issue. Please let me know if you have any concerns

@hanyuel
Copy link
Contributor

hanyuel commented Jun 26, 2023

@Indresh2410 sounds good. Please tag me when you have a PR up.

@Indresh2410
Copy link
Contributor

Sure. Thanks @hanyuel

@Indresh2410
Copy link
Contributor

@hanyuel can you please check once ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants