Skip to content

rgw/admin: fix infinite loop in role list pagination - #69066

Merged
ivancich merged 1 commit into
ceph:mainfrom
ashishkumsingh:fix-role-list-pagination-bug
Aug 10, 2026
Merged

ivancich merged 1 commit into
ceph:mainfrom
ashishkumsingh:fix-role-list-pagination-bug

Conversation

@ashishkumsingh

@ashishkumsingh ashishkumsingh commented May 24, 2026 •

Copy link
Copy Markdown
Contributor

The radosgw-admin role list command was getting stuck in an infinite loop when paginating through more than 100 roles.

Fixes: https://tracker.ceph.com/issues/76776

Tested via local vstart cluster by generating 105 roles and running radosgw-admin role list.

for i in {1..105}; do
  bin/radosgw-admin role create \
    --role-name=TestRole$i \
    --assume-role-policy-doc='{"Statement": [{"Effect": "Allow", "Principal": {"AWS": ["*"]}, "Action": ["sts:AssumeRole"]}]}' > /dev/null
done
$ bin/radosgw-admin role list | grep "Arn"  | wc -l
105

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@ashishkumsingh
ashishkumsingh requested a review from a team as a code owner May 24, 2026 06:43
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

15 similar comments
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@github-actions github-actions Bot added the rgw label May 24, 2026
@ivancich

Copy link
Copy Markdown
Member

ok to test

@ivancich

ivancich commented May 28, 2026 •

Copy link
Copy Markdown
Member

@ashishkumsingh Thanks for the contribution. Would you like to make a tracker on tracker.ceph.com, so we can track which backports are needed? Also, how would you feel about adding a test for listing more than 100 roles?

If you have questions or need some guidance, feel free to reach out.

@ashishkumsingh

Copy link
Copy Markdown
Contributor Author

Hey @ivancich thank you for reviewing the PR.

@ashishkumsingh Thanks for the contribution. Would you like to make a tracker on tracker.ceph.com, so we can track which backports are needed? Also, how would you feel about adding a test for listing more than 100 roles?

If you have questions or need some guidance, feel free to reach out.

Tracker https://tracker.ceph.com/issues/76776 is already opened for this PR. I will also work on the test for listing more than 100 roles.

@ashishkumsingh

Copy link
Copy Markdown
Contributor Author

@ivancich can you please review this?

@ashishkumsingh
ashishkumsingh requested a review from ivancich June 8, 2026 13:14
@anrao19

anrao19 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

pr testing completed and approved by @ivancich , tracker details : https://tracker.ceph.com/issues/77211
@ashishkumsingh , if no further testing is needed then this can be merged

@ivancich

Copy link
Copy Markdown
Member

Thank you for the new test, @ashishkumsingh ! We need to integrate the test so it's actually tested. Please see my in-line comment for how I suggest this be done. We will need to do QA all over again, so we can make sure it all works. So I removed the TESTED and ready-to-merge labels.

@ivancich ivancich removed the needs-qa label Jun 10, 2026
@ashishkumsingh
ashishkumsingh force-pushed the fix-role-list-pagination-bug branch from 75bb31b to b28cc0d Compare June 12, 2026 09:04
@ashishkumsingh

Copy link
Copy Markdown
Contributor Author

Thank you for the new test, @ashishkumsingh ! We need to integrate the test so it's actually tested. Please see my in-line comment for how I suggest this be done. We will need to do QA all over again, so we can make sure it all works. So I removed the TESTED and ready-to-merge labels.

Thank you @ivancich for the review. I've added to admin-pagination.yaml. Let me know if the Teuthology QA run catches anything.

@ashishkumsingh
ashishkumsingh requested a review from ivancich June 15, 2026 05:07
@@ -3,3 +3,7 @@ tasks:
clients:
client.0:
- rgw/run-admin-pagination.sh
- workunit:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can just add line 9 after line 5 without the rest. Let's have you do that and then we'll run this through QA. Thanks!

@ashishkumsingh
ashishkumsingh force-pushed the fix-role-list-pagination-bug branch from b28cc0d to 316c4b4 Compare June 17, 2026 16:45
The `radosgw-admin role list` command was getting stuck in an
infinite loop when paginating through more than 100 roles.

Fixes: https://tracker.ceph.com/issues/76776

Signed-off-by: Ashish Singh <[email protected]>
@ashishkumsingh
ashishkumsingh force-pushed the fix-role-list-pagination-bug branch from 316c4b4 to fd6a96d Compare June 17, 2026 16:46
@ivancich ivancich added wip-eric-testing-1 for ivancich testing needs-qa labels Jun 17, 2026
@anrao19

anrao19 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

jenkins test windows

@ashishkumsingh

Copy link
Copy Markdown
Contributor Author

@ivancich @anrao19 anything pending in this PR for merging?

@ivancich

Copy link
Copy Markdown
Member

@ivancich

Copy link
Copy Markdown
Member

@ashishkumsingh The QA run generated some consistent errors that were not on the main baseline from 4 days ago. Is there any way your PR would cause these errors?

Specifically the errors listed are:
2026-07-23T02:46:23.920 INFO:teuthology.orchestra.run.trial149.stdout:FAILED s3tests/functional/test_iam.py::test_account_role_policy_allow_create_bucket
2026-07-23T02:46:23.920 INFO:teuthology.orchestra.run.trial149.stdout:FAILED s3tests/functional/test_iam.py::test_cross_account_user_bucket_policy_allow_account_id
2026-07-23T02:46:23.920 INFO:teuthology.orchestra.run.trial149.stdout:FAILED s3tests/functional/test_iam.py::test_cross_account_bucket_user_policy_allow_account_id
2026-07-23T02:46:23.920 INFO:teuthology.orchestra.run.trial149.stdout:FAILED s3tests/functional/test_iam.py::test_cross_account_root_bucket_policy_allow_account_id
2026-07-23T02:46:23.920 INFO:teuthology.orchestra.run.trial149.stdout:FAILED s3tests/functional/test_s3control.py::test_account_public_access_block

Here are some example log files where they occurred:

I figured I'd allow you to take a look before trying to run the same branch without your PR to see if there's a differnce.

Thank you for your help!

@ashishkumsingh

Copy link
Copy Markdown
Contributor Author

@ashishkumsingh The QA run generated some consistent errors that were not on the main baseline from 4 days ago. Is there any way your PR would cause these errors?

Specifically the errors listed are: 2026-07-23T02:46:23.920 INFO:teuthology.orchestra.run.trial149.stdout:FAILED s3tests/functional/test_iam.py::test_account_role_policy_allow_create_bucket 2026-07-23T02:46:23.920 INFO:teuthology.orchestra.run.trial149.stdout:FAILED s3tests/functional/test_iam.py::test_cross_account_user_bucket_policy_allow_account_id 2026-07-23T02:46:23.920 INFO:teuthology.orchestra.run.trial149.stdout:FAILED s3tests/functional/test_iam.py::test_cross_account_bucket_user_policy_allow_account_id 2026-07-23T02:46:23.920 INFO:teuthology.orchestra.run.trial149.stdout:FAILED s3tests/functional/test_iam.py::test_cross_account_root_bucket_policy_allow_account_id 2026-07-23T02:46:23.920 INFO:teuthology.orchestra.run.trial149.stdout:FAILED s3tests/functional/test_s3control.py::test_account_public_access_block

Here are some example log files where they occurred:

* https://qa-proxy.ceph.com/teuthology/ivancich-2026-07-22_15:17:34-rgw-wip-eric-testing-1-distro-default-trial/387202/teuthology.log

* https://qa-proxy.ceph.com/teuthology/ivancich-2026-07-22_15:17:34-rgw-wip-eric-testing-1-distro-default-trial/387187/teuthology.log

I figured I'd allow you to take a look before trying to run the same branch without your PR to see if there's a differnce.

Thank you for your help!

Hey Eric,

These errors doesn't seem related to my changes.

Regards,
Ashish Singh

@ivancich

Copy link
Copy Markdown
Member

My testing branch may not have been up to date. I'm testing again.

@ivancich

ivancich commented Aug 6, 2026

Copy link
Copy Markdown
Member

Testing again, due to previous testing errors.

@ivancich

Copy link
Copy Markdown
Member

@ivancich
ivancich merged commit c78df53 into ceph:main Aug 10, 2026
6 checks passed
@ivancich

Copy link
Copy Markdown
Member

@ashishkumsingh I'm guessing this needs backports to squid, tentacle, and umbrella. I've updated the tracker to replace that. Would you be willing to do those?

@github-actions

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I have resolved the following tracker ticket due to the merge of this PR:

No backports are pending for the ticket. If this is incorrect, please update the tracker
ticket and reset to Pending Backport state.

Update Log: https://github.com/ceph/ceph/actions/runs/31395636776

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants