Repository navigation
rgw/posix: Handle dots in object names for multipart uploads - #66435
JoshuaGabriel wants to merge 1 commit into
Conversation
|
jenkins test make check |
|
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]>
2f754f3 to
5ab9979
Compare
|
Teuthology results (no regressions):
|
|
jenkins test make check |
|
jenkins test make check arm64 |
3 similar comments
|
jenkins test make check arm64 |
|
jenkins test make check arm64 |
|
jenkins test make check arm64 |
|
jenkins test make check |
|
jenkins test make check |
|
jenkins test make check arm64 |
|
jenkins test make check |
|
jenkins test make check arm64 |
|
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. |
|
jenkins test make check |
|
jenkins test make check arm64 |
| 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)) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I'm refreshing my memory on this, but how I understand it is this constructor is used for
-
existing multiparts
-
newly created multipart uploads
-
listing multipart can call this constructor too (just found this out now)
-
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?
|
@JoshuaGabriel Did you see @dang 's comment? |
|
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. |
|
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! |
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.
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
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.