Skip to content

rgw/iam: emit ResponseMetadata after the Result element - #73215

Merged
anrao19 merged 1 commit into
ceph:mainfrom
BenoitKnecht:rgw-iam-response-metadata-order
Nov 13, 2026
Merged

anrao19 merged 1 commit into
ceph:mainfrom
BenoitKnecht:rgw-iam-response-metadata-order

Conversation

@BenoitKnecht

Copy link
Copy Markdown
Contributor

GetRole, GetRolePolicy, ListRolePolicies,
ListAttachedRolePolicies and GetAccountSummary wrote <ResponseMetadata> before <XResult> inside the <XResponse> element. AWS always emits the result first, and SDKs with generated awsQuery deserializers (e.g. the Rust aws-sdk-iam) require the first child of <XResponse> to be <XResult>, so these calls fail with:

invalid result, expected GetRoleResult got StartEl { ... "ResponseMetadata" ... }

botocore tolerates either order, which is why the AWS CLI is unaffected.

Move ResponseMetadata after the Result section, matching the other IAM handlers.

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

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.

`GetRole`, `GetRolePolicy`, `ListRolePolicies`,
`ListAttachedRolePolicies` and `GetAccountSummary` wrote
`<ResponseMetadata>` before `<XResult>` inside the `<XResponse>`
element. AWS always emits the result first, and SDKs with generated
`awsQuery` deserializers (e.g. the Rust `aws-sdk-iam`) require the first
child of `<XResponse>` to be `<XResult>`, so these calls fail with:

```
invalid result, expected GetRoleResult got StartEl { ... "ResponseMetadata" ... }
```

`botocore` tolerates either order, which is why the AWS CLI is
unaffected.

Move `ResponseMetadata` after the Result section, matching the other IAM
handlers.

Fixes: https://tracker.ceph.com/issues/82250
Signed-off-by: Benoît Knecht <[email protected]>
@BenoitKnecht
BenoitKnecht requested a review from a team as a code owner October 28, 2026 22:04
@github-actions

Copy link
Copy Markdown

Thank you for your contribution. Since you are not yet a member of the Ceph organization with write permissions on ceph/ceph.git, our CI will not automatically run. Any member of the Ceph organization may label this PR ci-approved to allow Jenkins CI jobs to run.

@github-actions github-actions Bot added the rgw label Oct 28, 2026
@anrao19

anrao19 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-anrao4-testing-2026-11-02-0647-main.

@anrao19

anrao19 commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

This PR has been added to wip-anrao4-testing-2026-11-02-0647-main.

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

@anrao19
anrao19 merged commit 430fde1 into ceph:main Nov 13, 2026
21 checks passed
@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/43383053252

@BenoitKnecht

Copy link
Copy Markdown
Contributor Author

@anrao19 Given that this is a pretty trivial change, yet an important one for compatibility, I think it's a good candidate for being backported to all supported versions of Ceph. What's the process for this? Do I need to set something on the tracker issue besides resetting to Pending Backport state?

@BenoitKnecht

Copy link
Copy Markdown
Contributor Author

@anrao19 Given that this is a pretty trivial change, yet an important one for compatibility, I think it's a good candidate for being backported to all supported versions of Ceph. What's the process for this? Do I need to set something on the tracker issue besides resetting to Pending Backport state?

Nevermind, I see that the backport tickets have been created. 👍

@cbodley

cbodley commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Do I need to set something on the tracker issue besides resetting to Pending Backport state?

just that and setting the target releases in the Backport field

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.

3 participants