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

Error message wrong with only gidRangeStart without gidRangeEnd #486

Closed
pierluigilenoci opened this issue Jun 10, 2021 · 1 comment
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@pierluigilenoci
Copy link
Contributor

/kind bug

What happened?

If you specify only gidRangeStart without specifying gidRangeEnd the error message is wrong:

rpc error: code = InvalidArgument desc = Missing gidRangeStart parameter

What you expected to happen?

I expect to receive this message:

rpc error: code = InvalidArgument desc = Missing gidRangeEnd parameter

In addition, it should be more clearly specified in the documentation whether these two parameters are really optional and that if one is specified, the other must also be specified.

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

Don't specify gidRangeEnd

Anything else we need to know?:

I found the error in the code:

} else {
// Ensure GID max is provided with GID min
if gidMin != 0 {
return nil, status.Errorf(codes.InvalidArgument, "Missing %v parameter", GidMin)
}

This should be:

return nil, status.Errorf(codes.InvalidArgument, "Missing %v parameter", GidMax)

Environment

  • Kubernetes version (use kubectl version): not relevant
  • Driver version: v1.3.0
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 10, 2021
@pierluigilenoci
Copy link
Contributor Author

Closed by #487

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

No branches or pull requests

2 participants