Skip to content

rgw/posix: Handle dots in object names for multipart uploads - #66435

Closed
JoshuaGabriel wants to merge 1 commit into
ceph:mainfrom
JoshuaGabriel:rgw-posix-multipartupload
Closed

JoshuaGabriel wants to merge 1 commit into
ceph:mainfrom
JoshuaGabriel:rgw-posix-multipartupload

Conversation

@JoshuaGabriel

Copy link
Copy Markdown
Contributor

Fix multipart upload failure for names with dots. Object names were incorrectly split at the last dot during initiation, causing directory mismatches in part uploads. Generate random upload_id instead of parsing object name.

  • Before: "host.example.com" → oid="host.example", upload_id="com"
  • After: "host.example.com" → oid="host.example.com", upload_id="2~abc123"

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

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.

@JoshuaGabriel
JoshuaGabriel requested a review from a team as a code owner November 27, 2025 03:08
@github-actions github-actions Bot added the rgw label Nov 27, 2025
@JoshuaGabriel

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@JoshuaGabriel

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

Fix multipart upload failure for names with dots. Object names were
incorrectly split at the last dot during initiation, causing directory
mismatches in part uploads. Generate random upload_id instead of parsing object name.

- Before: "host.example.com" → oid="host.example", upload_id="com"
- After: "host.example.com" → oid="host.example.com", upload_id="2~abc123"

Fixes: https://tracker.ceph.com/issues/74005
Signed-off-by: Joshua Blanch <[email protected]>
@JoshuaGabriel
JoshuaGabriel force-pushed the rgw-posix-multipartupload branch from 2f754f3 to 5ab9979 Compare November 27, 2025 22:16
@github-actions github-actions Bot added the tests label Nov 27, 2025
@cbodley
cbodley requested a review from dang December 1, 2025 15:14
@ivancich ivancich added the wip-eric-testing-1 for ivancich testing label Jan 29, 2026
@ivancich

ivancich commented Feb 3, 2026

Copy link
Copy Markdown
Member

@ivancich

ivancich commented Feb 3, 2026

Copy link
Copy Markdown
Member

jenkins test make check

@ivancich

ivancich commented Feb 3, 2026

Copy link
Copy Markdown
Member

jenkins test make check arm64

3 similar comments
@ivancich

ivancich commented Feb 3, 2026

Copy link
Copy Markdown
Member

jenkins test make check arm64

@JoshuaGabriel

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@JoshuaGabriel

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@JoshuaGabriel

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@ivancich ivancich removed the wip-eric-testing-1 for ivancich testing label Feb 9, 2026
@JoshuaGabriel

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@JoshuaGabriel

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@JoshuaGabriel

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@JoshuaGabriel

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions Bot added the stale label Apr 25, 2026
@JoshuaGabriel

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@JoshuaGabriel

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@github-actions github-actions Bot removed the stale label May 22, 2026
std::optional<std::string> _upload_id, ACLOwner& _owner) {
if (_upload_id && !_upload_id->empty()) {
init(_oid, *_upload_id, _owner);
} else if (!from_meta(_oid, _owner)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I believe there are situations when we need to recover the info from the meta name, so we can't just remove this. Rather, we should change the meta character from . to something that AWS says to avoid, like # or |, maybe.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm refreshing my memory on this, but how I understand it is this constructor is used for

  1. existing multiparts

  2. newly created multipart uploads

  3. listing multipart can call this constructor too (just found this out now)

  4. is not broken (bc it has an upload_id)

And the bug I saw was doing 2) when there is a file name with a dot for newly created multipart upload but this would break 3) in some cases.

Right now the POSIXMPObj constructor infers based on the object name, but IMO we should give that responsibility to the caller of this constructor then handle appropriately.

enum class POSIXMPObjMode {
  ObjectKey, 
  MetaName,
};
Then:
POSIXMPObj(POSIXDriver* driver, const std::string& _oid,
           std::optional<std::string> _upload_id,
           ACLOwner& _owner,
           POSIXMPObjMode mode = POSIXMPObjMode::ObjectKey)
{
  if (_upload_id && !_upload_id->empty()) {
    init(_oid, *_upload_id, _owner);
  } else if (mode == POSIXMPObjMode::MetaName) {
    from_meta(_oid, _owner);
  } else {
    init_gen(driver, _oid, _owner);
  }
}

so calls would look like

POSIXMPObj(driver, "foo.bar", std::nullopt, owner);
POSIXMPObj(driver, "foo.bar.2~abc123", std::nullopt, owner, POSIXMPObjMode::MetaName);

maybe, thoughts?

@ivancich
ivancich self-requested a review June 11, 2026 14:20
@ivancich

Copy link
Copy Markdown
Member

@JoshuaGabriel Did you see @dang 's comment?

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions Bot added the stale label Aug 10, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

@github-actions github-actions Bot closed this Sep 9, 2026
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