Bug #3442

DELETE on a pithos container returns

Added by Stavros Sachtouris over 8 years ago.

Status:New Start date:03/12/2013
Priority:Medium Due date:
Assignee:- % Done:

0%

Category:- Spent time: -
Target version:0.13.0

Description

A DELETE request on an empty pithos container responds with a 413 quota error (request entity too large):

Request:
delete https://pithos.okeanos.io/v1/<uuid>/<existing_empty_container>
X-Auth-Token: <token>

Reponse:
413 REQUEST ENTITY TOO LARGE
content-length: 117
content-language: en-us
date: Tue, 12 Mar 2013 17:11:42 GMT
content-type: text/html; charset=utf-8
vary: Accept-Language
connection: close
server: gunicorn/0.14.5

{"username": "myusername" "auth_token_expires": 1365176045000, "auth_token_created": 1362584045000, "uuid": "myuuid", "name": "Stavros Sachtouris", "auth_token": "my70k3n==", "groups": ["default"], "id": 75, "email": [""]}

Associated revisions

Revision 0a92ff85
Added by Sofia Papagiannaki over 8 years ago

Fix pithos purging accounting

Refs: #3442
Refs: #1733

Pithos has two different version accounting
policies:
  • free: do not include object history version size
    to the total account usage
  • debit: include object history version size to
    the total account usage
    This configurable by
    PITHOS_BACKEND_FREE_VERSIONING setting.

Pithos delete container function purges
the history versions of the including objects.
and should send to the quota holder component
the released disk space only
in the case of debit version accounting policy.

Also the purging function used to return
the negative of the computed released disk space
but to the quotaholder component was sent
its negative.
So, erroneously, the released disk space was
added to the total quota usage.

Provide tests for the following distinct cases:
  • free version accounting policy (PITHOS_BACKEND_FREE_VERSIONING=True)
    and `auto` container versioning policy
  • free version accounting policy
    (PITHOS_BACKEND_FREE_VERSIONING=True)
    and `none` container versioning policy
  • debit version accounting policy
    (PITHOS_BACKEND_FREE_VERSIONING=False)
    and `auto` container versioning policy
  • debit version accounting policy(PITHOS_BACKEND_FREE_VERSIONING=False)
    and `none` container versioning policy

Also available in: Atom PDF