Skip to content
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

[WIP] Various fixes for WORM mode #159

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions oioswift/proxy/controllers/obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
from oioswift.utils import check_if_none_match, \
handle_not_allowed, handle_oio_timeout, handle_service_busy

MULTIUPLOAD_SUFFIX = '+segments'
SLO = 'x-static-large-object'


Expand Down Expand Up @@ -663,6 +664,10 @@ def DELETE(self, req):
def _delete_object(self, req):
storage = self.app.storage
oio_headers = {'X-oio-req-id': self.trans_id}
# Allow swift3 to delete things from the multipart container
if (req.environ.get('swift.source') == 'S3' and
self.container_name.endswith(MULTIUPLOAD_SUFFIX)):
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO it will not work with Container Hierachy or regexcontainer, maybe add a test regarding in oio-bucket-name ?

oio_headers['X-oio-admin'] = 'true'
try:
storage.object_delete(
self.account_name, self.container_name, self.object_name,
Expand Down