From a225bbe3659903bfc8b1daa2c61a5d6928da4970 Mon Sep 17 00:00:00 2001 From: "Florent Vennetier (OpenIO)" Date: Wed, 27 Feb 2019 16:56:39 +0100 Subject: [PATCH] obj: allow S3 MPU to work in worm mode These require the deletion of a temporary manifest at the end of the upload. --- oioswift/proxy/controllers/obj.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/oioswift/proxy/controllers/obj.py b/oioswift/proxy/controllers/obj.py index cd4ce385..99bab69c 100644 --- a/oioswift/proxy/controllers/obj.py +++ b/oioswift/proxy/controllers/obj.py @@ -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' @@ -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)): + oio_headers['X-oio-admin'] = 'true' try: storage.object_delete( self.account_name, self.container_name, self.object_name,