-
Notifications
You must be signed in to change notification settings - Fork 90
[NSFS | GLACIER] Add support for GLACIER_DA and forced GLACIER #9219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3612,11 +3612,15 @@ class NamespaceFS { | |
| } | ||
|
|
||
| async _is_storage_class_supported(storage_class) { | ||
| const glacier_storage_classes = [ | ||
guymguym marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| s3_utils.STORAGE_CLASS_GLACIER, | ||
| s3_utils.STORAGE_CLASS_GLACIER_DA, | ||
| s3_utils.STORAGE_CLASS_GLACIER_IR, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Newly added storage class in STORAGE_CLASS_GLACIER_DA, And STORAGE_CLASS_GLACIER_IR was missing in previous check? Is there any reason for adding it now?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, these are newly added. |
||
| ]; | ||
|
|
||
| if (!storage_class || storage_class === s3_utils.STORAGE_CLASS_STANDARD) return true; | ||
|
|
||
| if (storage_class === s3_utils.STORAGE_CLASS_GLACIER) { | ||
| // TODO: Upon integration with underlying systems, we should | ||
| // check if archiving is actually supported or not | ||
| if (glacier_storage_classes.includes(storage_class)) { | ||
| return config.NSFS_GLACIER_ENABLED || false; | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not mutate headers before SigV4 auth; move override after authenticate_request()
Changing x-amz-storage-class pre-auth can invalidate AWS SigV4 when that header is signed. Apply override after authenticate_request(req) and before authorize_request(req); also limit to relevant ops.
Apply this diff:
Place this block immediately after
authenticate_request(req);:📝 Committable suggestion
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tangledbytes I think this comment on override_storage_class() is indeed concerning - do we have a test that covers this path with auth??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.