Skip to content

Conversation

@LLiuJJ
Copy link

@LLiuJJ LLiuJJ commented Feb 26, 2025

etcdserver: add ErrRootRoleNotGranted to better prompt users to grant root privileges to current call etcd's client user.

before:

./etcdctl --user="test1" role list
Password:
{"level":"warn","ts":"2025-02-26T23:05:11.856813+0800","logger":"etcd-client","caller":"v3@v3.6.0-alpha.0/retry_interceptor.go:65","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc0000ce000/127.0.0.1:2379","method":"/etcdserverpb.Auth/RoleList","attempt":0,"error":"rpc error: code = PermissionDenied desc = etcdserver: permission denied"}
Error: etcdserver: permission denied

after change:

 /etcdctl --user="test1" role list
Password:
{"level":"warn","ts":"2025-02-26T22:58:17.949208+0800","logger":"etcd-client","caller":"v3@v3.6.0-alpha.0/retry_interceptor.go:65","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc000277a40/127.0.0.1:2379","method":"/etcdserverpb.Auth/RoleList","attempt":0,"error":"rpc error: code = FailedPrecondition desc = etcdserver: permission denied, root role is not granted to current user"}
Error: etcdserver: permission denied, root role is not granted to current user

Signed-off-by: Colin <jay_jieliu@outlook.com>
@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: LLiuJJ
Once this PR has been reviewed and has the lgtm label, please assign spzala for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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
Copy link

Hi @LLiuJJ. Thanks for your PR.

I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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-sigs/prow repository.

Signed-off-by: Colin <jay_jieliu@outlook.com>
@LLiuJJ LLiuJJ changed the title add ErrRootRoleNotGranted error code etcdserver: add ErrRootRoleNotGranted error code Feb 26, 2025
@LLiuJJ LLiuJJ marked this pull request as draft March 11, 2025 04:53
@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants