-
-
Notifications
You must be signed in to change notification settings - Fork 2
Description
We recently pushed release v6.1.0 to camptocamp.org prod but we have observed errors when "publishing" images: uploading and thumbnails creating work but the photo backend returns a 500 error when moving files from "incoming" to "active".
The logs say:
ERROR c2cwsgiutils.errors POST http://haproxy.exoscale.infra.camptocamp.org:8081/publish returned status code 500: An error occurred (403) when calling the HeadObject operation: Forbidden
images_1 | File "/app/c2corg_images/views.py", line 114, in publish
images_1 | already_published = active_storage.exists(filename)
images_1 | File "/app/c2corg_images/storage.py", line 119, in exists
images_1 | raise e
images_1 | File "/app/c2corg_images/storage.py", line 101, in exists
images_1 | object.load()
See
https://github.com/c2corg/v6_images/blob/master/c2corg_images/views.py#L114
https://github.com/c2corg/v6_images/blob/master/c2corg_images/storage.py#L101
A hint found by @gberaudo: the file does not exist but the storage returns a 403 code instead of 404 as expected by https://github.com/c2corg/v6_images/blob/master/c2corg_images/storage.py#L116
It seems that S3 indeed returns 403 code when a file is missing.
The weird thing is that it worked on the demo site whose storage is also S3 (?).