Bug #3586

Suppresed exception in snf-pithos-app

Added by Stratos Psomadakis about 11 years ago.

Status:New Start date:04/12/2013
Priority:Medium Due date:
Assignee:Vangelis Koukis % Done:

0%

Category:Pithos Spent time: -
Target version:0.14.0

Description

On the okeanos.io pithos+ host, a block was (somehow) owned by root and not by www-data.

When trying to fetch an object containing the block, or the block itself, the block was opened "rb+", which resulted in an (unhandled) IOError exception in snf-pithos-backend, and consequently to an internal server error returned to the client.

1) Should the file be opened in "rb+" mode in the first place (pithos/backends/lib/hashfiler/context_file.py:145)? There's also a check for EROFS, when opening the file, which fallbacks to "rb" mode. Could it be extended to handle EACCESS too?
2) The block/file was opened outside the @api_method decorator, since snf-pithos-app uses an iterable ObjectWrapper for the HTTPResponse. With the default logging settings, we disable the existing loggers (thus the gunicorn loggers), and the exception was never logged (except an entry in apache2 access log).

Also available in: Atom PDF